-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
104 lines (98 loc) · 2.21 KB
/
docker-compose.yml
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
services:
# Database
db:
image: postgres:15
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
restart: unless-stopped
# Server
ink:
image: rust:bookworm
depends_on:
db:
condition: service_started
minio:
condition: service_started
redis:
condition: service_started
ports:
- "8000:8000"
environment:
DATABASE_URL: postgres://postgres:password@db:5432/db
REDIS_URL: redis://redis:6379
AUTH_SECRET: 99gSMXUgjiByJ5Fy # base64 secret to jwt encoding/decoding
CLOUDFLARE_ENDPOINT: http://minio:9000
CLOUDFLARE_ACCESS_KEY: minioadmin
CLOUDFLARE_SECRET_KEY: minioadmin
RESEND_API_KEY: something
RESEND_DOMAIN: something
HOSTNAME: http://locahost:3000
volumes:
- ./services/ink:/app
working_dir: /app
command: cargo run
entrypoint: sh -c "cargo build && cargo run"
dns:
- 8.8.8.8
- 8.8.4.4
networks:
- app_network
# S3 compatible API for dev
minio:
image: minio/minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_DOMAIN: minio
ports:
- "9000:9000" # API
- "9001:9001" # web console
volumes:
- minio_data:/data
networks:
- app_network
redis:
image: redis:alpine
ports:
- "6379:6379"
networks:
- app_network
# Next.js
nextjs:
image: node:latest
working_dir: /app
volumes:
- .:/app
ports:
- "3000:3000"
command: npm run dev
environment:
NEXT_PUBLIC_HOSTNAME: http://localhost:3000
INK_HOSTNAME: http://ink:8000
AUTH_SECRET: 99gSMXUgjiByJ5Fy # base64 secret to jwt encoding/decoding
depends_on:
- ink
dns:
- 8.8.8.8
- 8.8.4.4
networks:
- app_network
networks:
app_network:
volumes:
postgres_data:
minio_data: