forked from pythonindia/junction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (44 loc) · 926 Bytes
/
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
version: '3.8'
services:
db:
image: postgres:15-alpine
ports:
- "5432:5432"
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env
redis:
image: redis:latest
ports:
- "6379:6379"
restart: always
command: sh -c 'redis-server --requirepass ${REDIS_HOST_PASSWORD}'
web:
build:
context: .
dockerfile: Dockerfile
image: junction_local
volumes:
- .:/code
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
restart: always
depends_on:
- db
env_file:
- .env
command: sh -c 'python manage.py migrate && python manage.py runsslserver 0.0.0.0:${SERVER_PORT}'
celery:
image: junction_local
depends_on:
- db
- redis
- web
restart: always
env_file:
- .env
command: sh -c 'celery -A junction worker -l info -E'
volumes:
postgres_data: