-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
124 lines (122 loc) · 2.73 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: "3"
services:
nginx:
build:
context: ${PWD}/compose/nginx/
dockerfile: ${PWD}/compose/nginx/Dockerfile
ports:
- "5000:80"
volumes:
- ${PWD}/data:/data
- ${PWD}/dist:/var/www/static
environment:
IMAGE_RESIZER: image-resizer:8000
CORE: core:8000
STATIC: core:8000
CDN_COOKIE_VALIDATOR: cdn-cookie-validator:8000
networks:
- obr
depends_on:
- core
extra_hosts:
- "host.docker.internal:host-gateway"
db:
image: postgres:14-alpine
environment:
POSTGRES_USER: obr
POSTGRES_PASSWORD: obr
POSTGRES_HOST_AUTH_METHOD: password
# ports:
# - "5434:5432"
volumes:
- obr-db:/var/lib/postgresql/data
networks:
- obr
image-resizer:
build:
context: ${PWD}
dockerfile: ${PWD}/compose/image-resizer/Dockerfile
# ports:
# - "8180:8000"
volumes:
- ${PWD}/data:/data
environment:
SOURCE: fs:///data/media
networks:
- obr
media-encoder:
user: 1000:1000
build:
context: ${PWD}
dockerfile: ${PWD}/compose/media-encoder/Dockerfile
volumes:
- ${PWD}/data:/data
depends_on:
- core
core:
user: 1000:1000
command: ./manage.py runserver 0.0.0.0:8000
build:
context: ${PWD}
# dockerfile: ${PWD}/compose/core/Dockerfile
dockerfile: ${PWD}/docker/Dockerfile
image: obr/core:lateest
ports:
- "8080:8000"
volumes:
- ${PWD}/data:/app/data
env_file: ".env"
environment:
DEBUG: "yes"
DJANGO_SETTINGS_MODULE: config.settings.env
DATABASE_URL: psql://obr:obr@db:5432/obr
# EMAIL_URL: smtp://mailhog:1025
EMAIL_URL: consolemail://
networks:
- obr
depends_on:
- migrate
- db
sync-schedule:
user: 1000:1000
command: sh -c './manage.py sync_schedule -s $(date "+%Y-%m-%d") -i 300'
image: obr/core:lateest
volumes:
- ${PWD}/data:/app/data
env_file: ".env"
environment:
DATABASE_URL: psql://obr:obr@db:5432/obr
OBP_SYNC_TOKEN: "${OBP_SYNC_TOKEN}"
DJANGO_SETTINGS_MODULE: config.settings.env
networks:
- obr
depends_on:
- db
- migrate
- core
migrate:
user: 1000:1000
command: ./manage.py migrate --noinput
image: obr/core:lateest
env_file: ".env"
environment:
DATABASE_URL: psql://obr:obr@db:5432/obr
DJANGO_SETTINGS_MODULE: config.settings.env
networks:
- obr
depends_on:
- db
cdn-cookie-validator:
user: 1000:1000
build:
context: ${PWD}
dockerfile: ${PWD}/compose/cdn-cookie-validator/Dockerfile
ports:
- "8008:8000"
networks:
- obr
volumes:
obr:
obr-db:
networks:
obr: