Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (63 loc) · 2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (63 loc) · 2 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
# Local dependencies for development. The backend and frontend run on the host
# (`cargo run` / `pnpm dev`) so the `ostree` and `flatpak` binaries they shell
# out to are the ones you already have installed.
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: flatnexus
POSTGRES_PASSWORD: flatnexus
POSTGRES_DB: flatnexus
ports:
- '5432:5432'
volumes:
- postgres-data:/var/lib/postgresql/data
# Applied on first boot of an empty volume.
- ./flatnexus-backend/migrations:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U flatnexus']
interval: 5s
timeout: 5s
retries: 10
# Catches outbound mail so emailed one-time codes are readable without a real
# SMTP account. Web UI on http://localhost:8025.
mailhog:
image: mailhog/mailhog:latest
ports:
- '1025:1025'
- '8025:8025'
# Stands in for DigitalOcean Spaces locally. Both are S3-compatible, so the
# server runs the identical code path against either — point
# FLATNEXUS_SPACES_ENDPOINT at http://localhost:9000 and use the credentials
# below. Console on http://localhost:9001.
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: flatnexus
MINIO_ROOT_PASSWORD: flatnexus-dev-secret
ports:
- '9000:9000'
- '9001:9001'
volumes:
- minio-data:/data
healthcheck:
test: ['CMD', 'mc', 'ready', 'local']
interval: 5s
timeout: 5s
retries: 10
# Creates the bucket on first boot, then exits. Without it the server would
# fail its first upload against an empty MinIO.
minio-init:
image: minio/mc:latest
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 flatnexus flatnexus-dev-secret &&
mc mb --ignore-existing local/flatnexus-bundles
"
volumes:
postgres-data:
minio-data: