-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
142 lines (131 loc) · 3.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
142 lines (131 loc) · 3.29 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
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.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile
ports:
- "4567:4567"
environment:
- GUACD_ADDRESS=guacd:4822
- CERT_PATH=/app/certs/certificate.crt
- CERT_KEY_PATH=/app/certs/private.key
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=postgresuser
- POSTGRES_PASSWORD=postgrespassword
- POSTGRES_DB=sandbox_db
- REDIS_HOST=redis
- REDIS_PORT=6379
- MINIO_ENDPOINT=http://minio:9000 # Minio SDKs usually default to http unless specified
- MINIO_ACCESS_KEY=minioaccesskey
- MINIO_SECRET_KEY=miniosecretkey
# If your app specifically needs these for MinIO, use MINIO_ROOT_USER/PASSWORD
# - MINIO_ROOT_USER=minioaccesskey
# - MINIO_ROOT_PASSWORD=miniosecretkey
depends_on:
- guacd
- postgres
- redis
- minio
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "8000:80"
depends_on:
- backend
restart: unless-stopped
environment:
- GUAC_CLIENT_URL=https://backend:4567
- CADDY_GUAC_CLIENT_URL=${CADDY_GUAC_CLIENT_URL:-https://backend:4567}
guacd:
image: guacamole/guacd:latest
restart: unless-stopped
postgres:
image: postgres:15
environment:
POSTGRES_USER: postgresuser
POSTGRES_PASSWORD: postgrespassword
POSTGRES_DB: sandbox_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:alpine
ports:
- "6379:6379"
restart: unless-stopped
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioaccesskey # Changed from MINIO_ACCESS_KEY
MINIO_ROOT_PASSWORD: miniosecretkey # Changed from MINIO_SECRET_KEY
ports:
- "9000:9000" # API
- "9001:9001" # Console
volumes:
- minio_data:/data
restart: unless-stopped
clamd:
image: clamav/clamav:stable
restart: unless-stopped
networks:
- clam-net
healthcheck:
test: ["CMD", "clamdscan", "--ping", "1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
redis-clam:
image: redis:alpine
restart: unless-stopped
networks:
- clam-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
api:
image: ghcr.io/browsersec/clamav-go-api:latest
restart: unless-stopped
depends_on:
clamd:
condition: service_healthy
redis-clam:
condition: service_healthy
environment:
- NODE_ENV=production
- CLAMD_IP=clamd
- APP_FORM_KEY=FILES
- APP_PORT=3000
- APP_MAX_FILE_SIZE=26214400
- APP_MAX_FILES_NUMBER=4
- CLAMD_PORT=3310
- CLAMD_TIMEOUT=60000
- REDIS_URL=redis://redis-clam:6379
- JOB_EXPIRATION=3600
ports:
- '3000:3000'
networks:
- clam-net
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 3000 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
clam-net:
driver: bridge
volumes:
postgres_data: {}
minio_data: {}