-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
86 lines (82 loc) · 2.34 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
86 lines (82 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
services:
codeguard:
build: .
user: root
restart: always
container_name: codeguard
environment:
DATABASE_URL: mysql+pymysql://codeguard:codeguard@db/CodeGuard?charset=utf8mb4
AWS_S3_ENDPOINT_URL: http://minio:9000
AWS_S3_BUCKET: codeguard
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_S3_REGION: us-east-1
SESSION_COOKIE_HTTPONLY: true
volumes:
- ./.data/instance:/opt/CodeGuard/instance
- ./.data/secrets:/opt/CodeGuard/secrets
- ./CodeGuard:/opt/CodeGuard/CodeGuard:ro
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
networks:
default:
internal:
nginx:
image: nginx:stable
restart: always
container_name: nginx
volumes:
- ./conf/http.conf:/etc/nginx/nginx.conf:ro
- ./.data/log/nginx:/var/log/nginx
ports:
- 80:80
- 443:443
depends_on:
- codeguard
db:
image: mariadb:11.6
container_name: mariadb
restart: always # Changed from 'unless-stopped' to 'always'
environment:
MARIADB_ROOT_PASSWORD: codeguard
MARIADB_DATABASE: CodeGuard
MARIADB_USER: codeguard
MARIADB_PASSWORD: codeguard
MARIADB_AUTO_UPGRADE: 1
volumes:
- ./.data/mariadb:/var/lib/mysql # Host Directory : Container Directory
networks:
internal:
command: [mariadbd, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0]
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "--silent"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
minio:
image: minio/minio:RELEASE.2024-12-18T13-15-44Z
container_name: minio
restart: always # Changed from 'unless-stopped' to 'always'
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
networks:
internal:
volumes:
- ./.data/minio:/data # Host Directory : Container Directory
command: server /data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
# No need to define external volumes since we're using host directories
networks:
default:
internal:
internal: true