Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
109 lines (102 loc) · 3.16 KB
/
Copy pathcompose.yaml
File metadata and controls
109 lines (102 loc) · 3.16 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
name: myss
# Local development stack. POC scope: Postgres + Strapi, plus ClamAV and
# MinIO for the attachments module. Gotenberg, Keycloak, Redis and Temporal
# get added later alongside the work that needs them.
services:
postgres:
image: postgres:17-alpine
container_name: myss-postgres
environment:
POSTGRES_USER: myss
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-myss-local-dev}
POSTGRES_DB: myss
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
- ./Infra/Development/Postgres/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U myss -d myss"]
interval: 5s
timeout: 3s
retries: 10
strapi:
build:
context: ./Apps/MyssContent
target: dev
container_name: myss-strapi
env_file: ./Apps/MyssContent/.env
environment:
DATABASE_HOST: postgres # override localhost from .env inside the network
ports:
- "1337:1337"
volumes:
- ./Apps/MyssContent:/opt/app
- strapi-node-modules:/opt/app/node_modules
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:1337/_health"]
interval: 10s
timeout: 5s
retries: 12
start_period: 120s
# Same clamd major as the gitops manifest (manifests/apps/clamav). The API
# scans attachments against it over TCP 3310 (INSTREAM) before storing them.
clamav:
image: clamav/clamav:1.5.3
# clamav/clamav publishes amd64 only; on Apple Silicon this runs under
# Rosetta emulation, which is fine for dev-sized scans.
platform: linux/amd64
container_name: myss-clamav
ports:
- "3310:3310"
volumes:
- clamav-db:/var/lib/clamav
healthcheck:
test: ["CMD", "clamdcheck.sh"]
interval: 10s
timeout: 5s
retries: 30
# The first start downloads the signature databases, which takes a while.
start_period: 300s
# S3-compatible object store for attachments. Credentials match the
# ObjectStorage section in Apps/MyssApi/appsettings.Development.json.
minio:
image: minio/minio:latest
container_name: myss-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: myss
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-myss-local-dev}
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 5s
timeout: 3s
retries: 12
# One-shot bucket creation; safe to re-run (mb --ignore-existing).
minio-init:
image: minio/mc:latest
container_name: myss-minio-init
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 myss $${MINIO_ROOT_PASSWORD:-myss-local-dev} &&
mc mb --ignore-existing local/myss-attachments
"
environment:
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-myss-local-dev}
restart: "no"
volumes:
postgres-data:
strapi-node-modules:
clamav-db:
minio-data: