forked from tryretool/retool-onpremise
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (87 loc) · 2.34 KB
/
docker-compose.yml
File metadata and controls
93 lines (87 loc) · 2.34 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
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
89
90
91
92
93
version: '2'
services:
api:
image: tryretool/backend:latest
env_file: ./docker.env
environment:
- SERVICE_TYPE=API_SERVICE
- DB_CONNECTOR_HOST=http://db-connector
- DB_CONNECTOR_PORT=3002
- DB_SSH_CONNECTOR_HOST=http://db-ssh-connector
- DB_SSH_CONNECTOR_PORT=3002
networks:
- frontend-network
- backend-network
- db-connector-network
- db-ssh-connector-network
depends_on:
- postgres
- db-connector
- db-ssh-connector
command: bash -c "chmod -R +x ./docker_scripts; sync; ./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
links:
- postgres
ports:
- '3000:3000'
volumes:
- ./keys:/root/.ssh
- ssh:/retool_backend/autogen_ssh_keys
db-connector:
image: tryretool/backend:latest
command: bash -c "./retool_backend"
env_file: ./docker.env
environment:
- SERVICE_TYPE=DB_CONNECTOR_SERVICE
networks:
- db-connector-network
restart: on-failure
db-ssh-connector:
image: tryretool/backend:latest
command: bash -c "./docker_scripts/generate_key_pair.sh; ./retool_backend"
env_file: ./docker.env
environment:
- SERVICE_TYPE=DB_SSH_CONNECTOR_SERVICE
networks:
- db-ssh-connector-network
volumes:
- ssh:/retool_backend/autogen_ssh_keys
- ./keys:/retool_backend/keys
restart: on-failure
postgres:
image: 'postgres:9.6.5'
env_file: docker.env
networks:
- backend-network
volumes:
- data:/var/lib/postgresql/data
# Uncomment this if you do not need a database for storing custom data (e.g. CSVs)
user-postgres:
image: 'postgres:9.6.5'
env_file: ./userData/userData.env
networks:
- db-connector-network
volumes:
- user-data:/var/lib/postgresql/data
# Uncomment below to use nginx container to handle the frontend & SSL certification
https-portal:
image: tryretool/https-portal:latest
ports:
- '80:80'
- '443:443'
links:
- api
restart: always
env_file: ./docker.env
environment:
STAGE: 'local' # <- Change 'local' to 'production' to use a LetsEncrypt signed SSL cert
networks:
- frontend-network
networks:
frontend-network:
backend-network:
db-connector-network:
db-ssh-connector-network:
volumes:
ssh:
data:
user-data: