-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.letsencrypt.yml
More file actions
116 lines (109 loc) · 2.87 KB
/
docker-compose.letsencrypt.yml
File metadata and controls
116 lines (109 loc) · 2.87 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
105
106
107
108
109
110
111
112
113
114
115
116
version: '3.8'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./media:/media
- ./staticfiles:/static
networks:
- cinderbackend-net
acme-companion:
image: nginxproxy/acme-companion
container_name: acme-companion
depends_on:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./certs:/etc/nginx/certs:rw
- ./vhost.d:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
- ./acme:/etc/acme.sh
environment:
- DEFAULT_EMAIL=your-email@example.com
networks:
- cinderbackend-net
cinderbackend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile
container_name: cinderbackend
environment:
- POSTGRES_NAME=postgres
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=dbcinderbackend
- REDIS_HOST=rediscinderbackend
- CORS_ORIGIN_WHITELIST=http://localhost,http://localhost:4200,http://172.31.0.5
- ALLOWED_HOSTS=localhost,172.31.0.5,localhost:8000
- VIRTUAL_HOST=yourdomain.com
- VIRTUAL_PATH=/api
- LETSENCRYPT_HOST=yourdomain.com
- LETSENCRYPT_EMAIL=your-email@example.com
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
environment:
- POSTGRES_NAME=postgres
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=dbcinderbackend
- REDIS_HOST=rediscinderbackend
networks:
- cinderbackend-net
volumes:
- ./media:/app/media
frontend:
build:
context: .
dockerfile: ./dockerfiles/Dockerfile-frontend
container_name: frontend
env_file:
- /opt/cinderbackend/frontend.env
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
networks:
cinderbackend-net: