-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
115 lines (109 loc) · 3.03 KB
/
docker-compose.dev.yml
File metadata and controls
115 lines (109 loc) · 3.03 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
110
111
112
113
114
115
services:
db:
image: docker.io/postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: reimbursement
POSTGRES_USER: app
POSTGRES_PASSWORD: ${DB_PASSWORD:-devpassword}
volumes:
- pgdata_dev:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d reimbursement"]
interval: 5s
timeout: 5s
retries: 10
rustfs:
image: docker.io/rustfs/rustfs:latest
restart: unless-stopped
environment:
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: "0.0.0.0:9000"
RUSTFS_CONSOLE_ADDRESS: "0.0.0.0:9001"
RUSTFS_CONSOLE_ENABLE: "true"
RUSTFS_ACCESS_KEY: ${RUSTFS_ACCESS_KEY:-rustfsadmin}
RUSTFS_SECRET_KEY: ${RUSTFS_SECRET_KEY:-devsecretsecret16chars}
volumes:
- rustfsdata_dev:/data
ports:
- "9000:9000"
- "9001:9001"
migrate:
image: docker.io/denoland/deno:2.3.3
working_dir: /app
command:
- sh
- -c
- >-
deno install --allow-scripts &&
deno run -A npm:prisma@^7 generate &&
deno run -A npm:prisma@^7 migrate deploy &&
(deno run -A prisma/seed.ts || echo 'Seed failed — continuing')
environment:
DATABASE_URL: postgresql://app:${DB_PASSWORD:-devpassword}@db:5432/reimbursement
volumes:
- ./backend:/app
- backend_nm_dev:/app/node_modules
depends_on:
db:
condition: service_healthy
restart: on-failure
api:
image: docker.io/denoland/deno:2.3.3
working_dir: /app
command: deno run -A --watch main.ts
environment:
DATABASE_URL: postgresql://app:${DB_PASSWORD:-devpassword}@db:5432/reimbursement
JWT_SECRET: ${JWT_SECRET:-dev_jwt_secret_at_least_32_chars_long}
JWT_REFRESH_SECRET: ${JWT_REFRESH_SECRET:-dev_refresh_secret_32_chars_long_!}
S3_ENDPOINT: http://rustfs:9000
S3_PUBLIC_ENDPOINT: http://localhost:8080/s3
S3_ACCESS_KEY: ${RUSTFS_ACCESS_KEY:-rustfsadmin}
S3_SECRET_KEY: ${RUSTFS_SECRET_KEY:-devsecretsecret16chars}
S3_BUCKET: documents
PORT: "8000"
volumes:
- ./backend:/app
- backend_nm_dev:/app/node_modules
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
rustfs:
condition: service_started
ports:
- "8000:8000"
web:
image: docker.io/denoland/deno:2.3.3
working_dir: /app
command: sh -c "deno run -A --watch npm:vite --host 0.0.0.0 --port 3000"
environment:
VITE_API_BASE: ""
VITE_API_URL: http://api:8000
VITE_CURRENCY: ${CURRENCY:-CAD}
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- api
gateway:
build:
context: .
dockerfile: ./gateway/Dockerfile
restart: unless-stopped
depends_on:
- api
- rustfs
- web
volumes:
- ./gateway/Caddyfile.dev:/etc/caddy/Caddyfile:ro
ports:
- "8080:80"
- "8443:443"
volumes:
pgdata_dev:
rustfsdata_dev:
backend_nm_dev: