-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.production.yml
75 lines (70 loc) · 1.69 KB
/
compose.production.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
services:
# Container for web app
web:
build: .
depends_on:
- postgres
- nginx-proxy-acme
restart: unless-stopped
networks:
- nginx-proxy
- database
environment:
DATABASE_URL: postgresql://taxes_app:dev_pwd@postgres:5432/taxes?schema=public
VIRTUAL_HOST: ponou.unibuc.ro
LETSENCRYPT_HOST: ponou.unibuc.ro
# Container for NGINX reverse proxy
nginx-proxy:
image: nginxproxy/nginx-proxy:latest
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- nginx-proxy
labels:
- com.github.nginx-proxy.nginx
environment:
TRUST_DOWNSTREAM_PROXY: false
# ACME companion for NGINX, for automatical TLS certificate generation
nginx-proxy-acme:
image: nginxproxy/acme-companion:latest
restart: unless-stopped
depends_on:
- nginx-proxy
volumes:
- nginx-certs:/etc/nginx/certs
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
- /etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- nginx-proxy
environment:
DEFAULT_EMAIL: contact@it.unibuc.ro
# Database container
postgres:
image: postgres:16.1
expose:
- 5432
environment:
POSTGRES_USER: taxes_app
POSTGRES_PASSWORD: dev_pwd
POSTGRES_DB: taxes
volumes:
- db-data:/var/lib/postgresql/data
networks:
- database
volumes:
nginx-certs:
nginx-vhost:
nginx-html:
db-data:
networks:
nginx-proxy:
database: