-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (60 loc) · 1.18 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
version: '3'
services:
nginx-proxy:
image: nginx:alpine
container_name: nginx
restart: always
ports:
- "${PORT:-443:443}"
- "80:80"
environment:
- DEFAULT_HOST= wardixlab.com
- CERT_NAME= default.crt
volumes:
- ./certs:/etc/nginx/certs:ro
- ./conf.d:/etc/nginx/conf.d
networks:
proxy-net:
privileged: true
depends_on:
- app
app:
container_name: app
user: root
restart: always
build:
context: .
dockerfile: ./Dockerfile
environment:
- VIRTUAL_HOST=wardixlab.com, www.wardixlab.com
- CERT_NAME= default.crt
volumes:
- .:/app
expose:
- 8000
depends_on:
- db
networks:
proxy-net:
db:
container_name: db
image: postgres:12.0-alpine
user: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=database
ports:
- 5432:5432
networks:
proxy-net:
networks:
proxy-net:
driver: bridge
volumes:
postgres_data:
certs:
conf.d: