-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
executable file
·79 lines (78 loc) · 2.22 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: "3"
services:
##############################
# PHP Container
##############################
php:
build:
context: .
dockerfile: ./data/php/Dockerfile
args:
TIMEZONE: ${TIMEZONE}
volumes:
- ./data/php:/var/www/certbot/phpDir/:rw
- ./data/certbotSymfony/www:/var/www/certbot/
expose:
- 9000
networks:
- default
##############################
# NGINX Container
##############################
nginx:
image: nginx:1.15-alpine
expose:
- "80"
- "443"
ports:
- "80:80"
- "443:443"
networks:
- default
volumes:
- ./data/nginx:/etc/nginx/conf.d/:rw
- ./data/certbot/conf:/etc/letsencrypt/:rw
- ./data/certbotSymfony/conf:/etc/letsencrypt/symfony/:rw
- ./data/certbotSymfony/www:/var/www/certbot/:rw
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
##############################
# PostgreSQL Container
##############################
db:
image: postgres:13
volumes:
- db-data:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432/tcp
environment:
- POSTGRES_PASSWORD=pg_pass
- POSTGRES_USER=pg_user
- POSTGRES_DB=pg_db_name
- PGDATA=/var/lib/postgresql/data/pgdata
web:
image: odoo:13.0
depends_on:
- db
volumes:
- web-data:/var/lib/odoo
- ./data/odoo/config:/etc/odoo
- ./data/odoo/addons:/mnt/extra-addons
#This command initialize the DB so Odoo can work.
#Edit with your DB info.
#After initializing the first time, comment it.
command: "odoo -i base -d pg_db_name --stop-after-init --db_host=db -r pg_user -w pg_pass"
##############################
# Certbot Container
##############################
certbot:
image: certbot/certbot:latest
volumes:
- ./data/certbot/conf:/etc/letsencrypt/:rw
- ./data/certbotSymfony/conf:/etc/letsencrypt/symfony/:rw
- ./data/certbotSymfony/www:/var/www/certbot/:rw
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
db-data:
driver: local
web-data:
driver: local