-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
37 lines (37 loc) · 1.08 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
version: "3.7"
services:
helloneighbour:
build:
context: .
dockerfile: Dockerfile
postgres:
image: postgres-ssl
user: postgres
build:
context: database/docker
dockerfile: Dockerfile
volumes:
- ./deploy/postgres/ssl:/etc/postgres/ssl
- ./data:/var/lib/postgresql/data
environment:
- "POSTGRES_DB=helloneighbour"
- "POSTGRES_USER=helloneighbour"
- "POSTGRES_PASSWORD=changeme"
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
volumes:
- ./deploy/nginx:/etc/nginx/conf.d
- ./deploy/certbot/conf:/etc/letsencrypt
- ./deploy/certbot/www:/var/www/certbot
ports:
- "80:80"
- "443:443"
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
image: certbot/certbot
restart: unless-stopped
volumes:
- ./deploy/certbot/conf:/etc/letsencrypt
- ./deploy/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"