-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 1.46 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
version: '2'
services:
postgres:
restart: always
image: postgres:11.5
volumes:
- /var/lib/postgresql
env_file:
- .env
environment:
- POSTGRES_PASSWORD=$PASSWORD
- POSTGRES_USER=$USER
- POSTGRES_DB=$DB_NAME
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
- ./config/nginx:/etc/nginx/conf.d
- ./static:/static
- ./media:/media
- ./nginx_logs:/var/log/nginx/
depends_on:
- web
web:
image: icloud
build:
context: .
dockerfile: Dockerfile
entrypoint:
- ./wait-for-postgres.sh
- ./entrypoint.sh
volumes:
- .:/src
- ./static:/static
- ./media:/media
- ./nginx_logs:/nginx_logs
expose:
- "80"
links:
- postgres
depends_on:
- postgres
env_file:
- .env
environment:
- DATABASE_URL=postgres://$USER:$PASSWORD@postgres:$DB_PORT/$DB_NAME
- DEBUG=$DEBUG
redis:
hostname: redis
restart: always
image: redis:alpine
command: redis-server --appendonly yes
privileged: true
ports:
- "6379:6379"
celery_worker:
restart: always
image: maciekj
command: ./run_celery_worker.sh
environment:
- DATABASE_HOST=postgres
- DATABASE_URL=postgres://$USER:$PASSWORD@postgres:$DB_PORT/$DB_NAME
links:
- postgres
- redis
depends_on:
- redis
volumes_from:
- web
env_file:
- .env