forked from tkxkd0159/cosmonaut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
88 lines (86 loc) · 2.44 KB
/
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
80
81
82
83
84
85
86
87
88
services:
cosmonaut:
image: cosmonaut
container_name: cosmonaut-1
restart: always
build:
context: ./cosmonaut-api
dockerfile: Dockerfile
args:
- BUILD_ENV=production
depends_on:
- pgdb
- redis-sess
environment:
- COMPOSE=true
env_file:
- ./cosmonaut-api/.env
networks:
- myproxy
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
- type: bind
source: ./cosmonaut-frontend/build
target: /workspace/front-build
- type: volume
source: cosmproj
target: /workspace/cargo-projects/cosm
- type: volume
source: cosmbase
target: /workspace/cargo-projects/cosm-base
redis-sess:
image: redis
restart: always
networks:
- myproxy
pgdb:
image: postgres
restart: always
networks:
- myproxy
environment:
- POSTGRES_USER=${PGUSER:-ljs}
- POSTGRES_PASSWORD=${PGPASSWORD:-secret}
- POSTGRES_DB=${PGDATABASE:-cosmonaut}
volumes:
- pgdb:/var/lib/postgresql/data
- ./cosmonaut-api/compose.sql:/docker-entrypoint-initdb.d/init.sql
nginx:
image: nginx:1.15-alpine
restart: unless-stopped
depends_on:
- cosmonaut
volumes:
- ./data/nginx:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
ports:
- 80:80
- 443:443
networks:
- myproxy
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:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
- myproxy
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
pgdb:
driver: local
cosmproj:
driver: local
cosmbase:
driver: local
cargo:
driver: local
networks:
myproxy:
driver: bridge
name: cosmonaut_proxy