-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (97 loc) · 2.18 KB
/
docker-compose.yml
File metadata and controls
104 lines (97 loc) · 2.18 KB
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
version: '3.8'
services:
cinderbackend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile
container_name: cinderbackend
ports:
- "8000:8000"
env_file:
- .env
networks:
- cinderbackend-net
volumes:
- ./media:/app/media
- ./staticfiles:/app/staticfiles
cinderbackend-worker:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile
container_name: cinderbackend-worker
command: python manage.py rqworker default
env_file:
- .env
networks:
- cinderbackend-net
volumes:
- ./media:/app/media
frontend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile-frontend-dev
container_name: frontend
ports:
- "3000:80"
networks:
- cinderbackend-net
nginx-cinderbackend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile-nginx
container_name: nginx-cinderbackend
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./media:/media/
- ./staticfiles:/static/
- ./certs:/etc/nginx/certs
depends_on:
- cinderbackend
- frontend
- certs
networks:
- cinderbackend-net
dbcinderbackend:
container_name: dbcinderbackend
image: postgres:14
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- ./data:/var/lib/postgresql/data
networks:
- cinderbackend-net
rediscinderbackend:
container_name: rediscinderbackend
build:
context: .
dockerfile: ./dockerfiles/Dockerfile-redis
restart: always
environment:
- REDIS_PASSWORD=redis
ports:
- "6379:6379"
networks:
- cinderbackend-net
certs:
image: alpine:latest
container_name: certs
command: >
/bin/sh -c "
apk add --no-cache openssl &&
mkdir -p /certs &&
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /certs/nginx.key -out /certs/nginx.crt -subj '/CN=localhost'
"
volumes:
- ./certs:/certs
networks:
- cinderbackend-net
networks:
cinderbackend-net: