-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
82 lines (80 loc) · 2.05 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
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
ports:
- 6380:${REDISPORT:-6379}
networks:
- myproxy
pgdb:
image: postgres
restart: always
ports:
- 5433:${PGPORT:-5432}
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
web:
image: nginx
ports:
- 8080:80
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
volumes:
- ./templates:/etc/nginx/templates
depends_on:
- cosmonaut
restart: on-failure
networks:
- myproxy
volumes:
pgdb:
driver: local
cosmproj:
driver: local
cosmbase:
driver: local
cargo:
driver: local
networks:
myproxy:
driver: bridge
name: cosmonaut_proxy