-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
62 lines (58 loc) · 1.51 KB
/
docker-compose.yaml
File metadata and controls
62 lines (58 loc) · 1.51 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
services:
caddy:
image: caddy:2-alpine
container_name: boxchooser_caddy
ports:
- "5893:80"
- "5443:443"
volumes:
- ./Caddyfile.dev:/etc/caddy/Caddyfile:ro
- ./frontend:/srv/frontend:ro
- caddy_data:/data
- caddy_config:/config
environment:
- SITE_URL=${SITE_URL:-https://localhost}
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-https://localhost}
depends_on:
- backend
restart: unless-stopped
backend:
build: .
container_name: boxchooser_backend
ports:
- "8000:8000"
volumes:
- ./backend:/code/backend
- ./stores:/code/stores
- ./boxes:/code/boxes
- ./floorplans:/code/floorplans
- ./db:/db
- ./tools:/code/tools
env_file:
- .env
depends_on:
- mailhog
restart: unless-stopped
mailhog:
image: mailhog/mailhog:latest
container_name: boxchooser_mailhog
ports:
- "8026:8025" # Web UI (8026 on host, 8025 in container)
- "1026:1025" # SMTP Server (1026 on host, 1025 in container)
restart: unless-stopped
test:
image: node:20-alpine
working_dir: /app
volumes:
- ./package.json:/app/package.json:ro
- ./vitest.config.js:/app/vitest.config.js:ro
- ./frontend/js/lib:/app/lib:ro
- ./frontend/js/components:/app/components:ro
- ./frontend/tests:/app/tests:ro
- node_modules:/app/node_modules
command: sh -c "npm install && npm test"
profiles: ["test"]
volumes:
node_modules:
caddy_data:
caddy_config: