-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
142 lines (135 loc) · 3.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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
---
version: "3.2"
secrets:
postgres_password:
file: ./src/secrets/postgres-password
postgres_username:
file: ./src/secrets/postgres-username
private_ssh_key:
file: ./src/secrets/private-ssh-key
rdp_password:
file: ./src/secrets/rdp-password
rdp_username:
file: ./src/secrets/rdp-username
vnc_password:
file: ./src/secrets/vnc-password
vnc_username:
file: ./src/secrets/vnc-username
windows_sftp_base:
file: ./src/secrets/windows-sftp-base
volumes:
dbdata:
services:
init-guac-db:
command:
- /bin/sh
- -c
- |
test -e /init/initdb.sql &&
echo 'init file already exists' ||
/opt/guacamole/bin/initdb.sh --postgres > /init/00_initdb.sql
image: guacamole/guacamole:1.5.1
logging:
driver: json-file
options:
max-size: 100m
volumes:
- source: ./dbinit
target: /init
type: bind
guacd:
container_name: guacd
image: guacamole/guacd:1.5.1
logging:
driver: json-file
options:
max-size: 100m
restart: always
postgres:
container_name: postgres
depends_on:
- init-guac-db
environment:
POSTGRES_DB: guacamole_db
POSTGRES_PASSWORD_FILE: /run/secrets/postgres-password
POSTGRES_USER_FILE: /run/secrets/postgres-username
image: postgres:15
logging:
driver: json-file
options:
max-size: 100m
restart: always
secrets:
- source: postgres_password
target: postgres-password
- source: postgres_username
target: postgres-username
volumes:
- read_only: true
source: ./dbinit
target: /docker-entrypoint-initdb.d
type: bind
- source: dbdata
target: /var/lib/postgresql/data
type: volume
guacamole:
cap_add:
# Required to allow listening on privileged port 80
- NET_BIND_SERVICE
command:
- /bin/sh
- -c
- |
export POSTGRES_USER=$$(cat /run/secrets/postgres-username);
export POSTGRES_PASSWORD=$$(cat /run/secrets/postgres-password);
/opt/guacamole/bin/start.sh
container_name: guacamole
depends_on:
- guacd
- postgres
environment:
GUACD_HOSTNAME: guacd
GUACD_PORT: 4822
HEADER_ENABLED: "true"
POSTGRES_DATABASE: guacamole_db
POSTGRES_HOSTNAME: postgres
POSTGRES_PORT: 5432
image: guacamole/guacamole:1.5.1
logging:
driver: json-file
options:
max-size: 100m
ports:
- "127.0.0.1:80:8080/tcp"
restart: always
secrets:
- source: postgres_password
target: postgres-password
- source: postgres_username
target: postgres-username
guacscanner:
depends_on:
- postgres
image: cisagov/guacscanner:1.1.15
logging:
driver: json-file
options:
max-size: 100m
restart: always
secrets:
- source: postgres_password
target: postgres-password
- source: postgres_username
target: postgres-username
- source: private_ssh_key
target: private-ssh-key
- source: rdp_password
target: rdp-password
- source: rdp_username
target: rdp-username
- source: vnc_password
target: vnc-password
- source: vnc_username
target: vnc-username
- source: windows_sftp_base
target: windows-sftp-base