forked from tryretool/retool-onpremise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
129 lines (121 loc) · 3.25 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: '2'
services:
api:
build:
context: ./
dockerfile: Dockerfile
env_file: ./docker.env
environment:
- SERVICE_TYPE=MAIN_BACKEND
- 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
- retooldb-postgres
- db-connector
- db-ssh-connector
- jobs-runner
command: bash -c "./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
links:
- postgres
ports:
- '3000:3000'
restart: on-failure
volumes:
- ./keys:/root/.ssh
- ssh:/retool_backend/autogen_ssh_keys
- ./retool:/usr/local/retool-git-repo
- ${BOOTSTRAP_SOURCE:-./retool}:/usr/local/retool-repo
jobs-runner:
build:
context: ./
dockerfile: Dockerfile
env_file: ./docker.env
environment:
- SERVICE_TYPE=JOBS_RUNNER
networks:
- backend-network
depends_on:
- postgres
command: bash -c "chmod -R +x ./docker_scripts; sync; ./docker_scripts/wait-for-it.sh postgres:5432; ./docker_scripts/start_api.sh"
links:
- postgres
volumes:
- ./keys:/root/.ssh
db-connector:
build:
context: ./
dockerfile: Dockerfile
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:
build:
context: ./
dockerfile: Dockerfile
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
# Retool's storage database. See these docs to migrate to an externally hosted database: https://docs.retool.com/docs/configuring-retools-storage-database
postgres:
image: 'postgres:11.13'
env_file: docker.env
networks:
- backend-network
- db-connector-network
volumes:
- data:/var/lib/postgresql/data
retooldb-postgres:
image: "postgres:14.3"
env_file: retooldb.env
networks:
- backend-network
- db-connector-network
volumes:
- retooldb-data:/var/lib/postgresql/data
# Not required, but leave this container to use nginx for handling 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
CLIENT_MAX_BODY_SIZE: 40M
KEEPALIVE_TIMEOUT: 605
PROXY_CONNECT_TIMEOUT: 600
PROXY_SEND_TIMEOUT: 600
PROXY_READ_TIMEOUT: 600
networks:
- frontend-network
networks:
frontend-network:
backend-network:
db-connector-network:
db-ssh-connector-network:
volumes:
ssh:
data:
retooldb-data: