-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (46 loc) · 1.36 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
services:
tunnel.pgsql:
build:
context: .
dockerfile: Dockerfile
args:
PRIVATE_KEY_PATH: ${PRIVATE_KEY_PATH}
container_name: tunnel.pgsql
volumes:
- ${PRIVATE_KEY_PATH}:/root/.ssh/private_key.pem
- ./tunnel.sh:/tunnel.sh
environment:
PRIVATE_KEY_PATH: ${PRIVATE_KEY_PATH}
TUNNEL_DB_HOST: ${TUNNEL_PGSQL_DB_HOST}
TUNNEL_DB_PORT: ${TUNNEL_PGSQL_DB_PORT}
TUNNEL_AUTH_USER: ${TUNNEL_AUTH_USER}
TUNNEL_AUTH_HOST: ${TUNNEL_AUTH_HOST}
TUNNEL_AUTH_PORT: ${TUNNEL_AUTH_PORT}
TUNNEL_SHARED_PORT: ${TUNNEL_SHARED_PORT}
networks:
- test-network
command: [ "sh", "/tunnel.sh" ]
tunnel.mysql:
build:
context: .
dockerfile: Dockerfile
args:
PRIVATE_KEY_PATH: ${PRIVATE_KEY_PATH}
container_name: tunnel.mysql
volumes:
- ${PRIVATE_KEY_PATH}:/root/.ssh/private_key.pem
- ./tunnel.sh:/tunnel.sh
environment:
PRIVATE_KEY_PATH: ${PRIVATE_KEY_PATH}
TUNNEL_DB_HOST: ${TUNNEL_MYSQL_DB_HOST}
TUNNEL_DB_PORT: ${TUNNEL_MYSQL_DB_PORT}
TUNNEL_AUTH_USER: ${TUNNEL_AUTH_USER}
TUNNEL_AUTH_HOST: ${TUNNEL_AUTH_HOST}
TUNNEL_AUTH_PORT: ${TUNNEL_AUTH_PORT}
TUNNEL_SHARED_PORT: ${TUNNEL_SHARED_PORT}
networks:
- test-network
command: [ "sh", "/tunnel.sh" ]
networks:
test-network:
driver: bridge