Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
77 lines (74 loc) · 1.99 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
77 lines (74 loc) · 1.99 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
name: preflight
services:
redis:
image: redis:7-alpine
container_name: redis
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
mailpit:
image: axllent/mailpit:v1.31.1
container_name: mailpit
ports:
- 1025:1025
- 8025:8025
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:8025/api/v1/info"]
interval: 5s
timeout: 5s
retries: 10
postgres:
image: postgres:18-alpine
container_name: postgres
ports:
- 5432:5432
volumes:
# postgres:18 keeps PGDATA under /var/lib/postgresql; mounting the old /data path loses it.
- ./data/postgres:/var/lib/postgresql
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=app
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
seaweedfs:
image: chrislusf/seaweedfs:4.50
container_name: seaweedfs
ports:
- 8333:8333
volumes:
- ./data/seaweedfs:/data
- ./docker/seaweedfs-s3.json:/etc/seaweedfs/s3.json:ro
# The image entrypoint drops privileges to the `seaweed` user. The identity file keeps the
# gateway authenticated; the app bucket is created on the first upload for admin identities.
# Its credentials must match S3_ACCESS_KEY / S3_SECRET_KEY in .env.
command: ["server", "-s3", "-s3.iam=false", "-s3.config=/etc/seaweedfs/s3.json"]
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "8333"]
interval: 5s
timeout: 5s
retries: 10
preflight:
build:
context: .
dockerfile: Dockerfile
container_name: preflight
ports:
- 3000:3000
env_file:
- .env.example
depends_on:
postgres:
condition: service_healthy
seaweedfs:
condition: service_healthy
redis:
condition: service_healthy