-
Notifications
You must be signed in to change notification settings - Fork 30
/
docker-compose.yml
109 lines (101 loc) · 2.45 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
version: "3.8"
services:
postgres:
image: postgres:14
hostname: postgres
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-lazyblacksmith}
POSTGRES_USER: lazyblacksmith
volumes:
- db_data:/var/lib/postgresql/data
networks:
- lazyblacksmith
restart: always
redis:
image: redis:6
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- redis_data:/data
networks:
- lazyblacksmith
logging:
driver: none
restart: always
# this container will run db migrations and do the initial load of the SDE
# if you want to force an SDE update, you can run
# `docker-compose run init-db sde-import`
init-db:
build:
context: .
dockerfile: deploy/Dockerfile
command: init-db
env_file: .env
environment: &service_environment
UWSGI_SOCKET_TYPE: ${UWSGI_SOCKET_TYPE:---http}
CELERY_BROKER: redis://redis:6379/0
CELERY_RESULT_BACKEND: redis://redis:6379/0
DB_URI: postgresql://lazyblacksmith:${POSTGRES_PASSWORD:-lazyblacksmith}@postgres/lazyblacksmith
SECRET_KEY: ${SECRET_KEY?SECRET_KEY must be set in your .env file}
ESI_SECRET_KEY: ${ESI_SECRET_KEY-}
ESI_CLIENT_ID: ${ESI_CLIENT_ID-}
ESI_REDIRECT_DOMAIN: ${ESI_REDIRECT_DOMAIN-}
volumes:
- sde:/sde
networks:
- lazyblacksmith
depends_on:
- postgres
- redis
uwsgi:
build:
context: .
dockerfile: deploy/Dockerfile
hostname: web
command: uwsgi
env_file: .env
environment: *service_environment
volumes:
- static:/static
ports:
- "${PORT:-9090}:9090"
networks:
- lazyblacksmith
depends_on:
init-db:
condition: service_completed_successfully
restart: always
celery:
build:
context: .
dockerfile: deploy/Dockerfile
hostname: celery
command: celery
env_file: .env
environment: *service_environment
networks:
- lazyblacksmith
depends_on:
init-db:
condition: service_completed_successfully
restart: always
celery-beat:
build:
context: .
dockerfile: deploy/Dockerfile
command: celery-beat
env_file: .env
environment: *service_environment
networks:
- lazyblacksmith
depends_on:
init-db:
condition: service_completed_successfully
restart: always
volumes:
db_data:
redis_data:
static:
sde:
networks:
lazyblacksmith: