-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-server.yml
95 lines (84 loc) · 2.13 KB
/
docker-compose-server.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
version: '3.7'
services:
rabbitmq:
restart: always
container_name: "rabbitmq"
hostname: rabbitmq
image: "rabbitmq:3-management"
env_file:
- .env
# ports:
# - "15672:15672"
# - "5672:5672"
volumes:
- ./GC-Backend/data/rabbitmq:/var/lib/rabbitmq
- ./GC-Backend/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
db:
container_name: "gc_postgres"
image: "postgres"
env_file:
- .env
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./GC-Backend/data/post/:/var/lib/postgresql/data/
# ports:
# - '5432:5432'
app:
container_name: "gc_app"
build:
context: ./GC-Backend
dockerfile: ./Dockerfile
target: DJANGO_APP
env_file:
- .env
volumes:
- ./GC-Backend/data/staticfiles:/app/staticfiles
- ./GC-Backend:/app
ports:
- '8000:8000'
environment:
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
- CELERY_BROKER=amqp://guest:guest@rabbitmq:5672/
depends_on:
- rabbitmq
- db
celery:
container_name: "gc_celery"
build:
context: ./GC-Backend
dockerfile: ./Dockerfile
command : celery -A GD worker -l INFO
volumes:
- ./GC-Backend:/app
env_file: .env
depends_on:
- rabbitmq
front:
container_name: "gc_front"
build:
context: ./GC-Front
dockerfile: ./dockerfile
env_file:
- .env
depends_on:
- app
nginx:
image: nginx:alpine
container_name: gc_nginx
volumes:
- "/etc/letsencrypt/live/autgamecraft.ir/fullchain.pem:/etc/nginx/ssl/server.crt"
- "/etc/letsencrypt/live/autgamecraft.ir/privkey.pem:/etc/nginx/ssl/server.key"
- "./nginx/default.conf:/etc/nginx/nginx.conf"
- ./nginx/log:/var/log/nginx
- ./nginx/proxy_params:/etc/nginx/proxy_params
- ./GC-Backend/data/staticfiles:/var/www/app/staticfiles
ports:
- "80:80"
- "443:443"
restart: always
depends_on:
- app
- front