-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (48 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
48 lines (48 loc) · 1.18 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
version: '3'
services:
app:
image: wazery/draft-api:develop
restart: always
command:
- rails server -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
links:
- postgres
#- nginx
tty: true
env_file:
- api.env
nginx:
image: nginx:1.15-alpine
# build:
# context: .
# dockerfile: ./docker/nginx/Dockerfile
depends_on:
- app
restart: always
volumes:
- ./docker/nginx:/etc/nginx/conf.d
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/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
volumes:
- ./docker/nginx/certbot/conf:/etc/letsencrypt
- ./docker/nginx/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
postgres:
image: postgres:9.4
restart: always
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432"
volumes:
pgdata: