Repository navigation
Expand file tree
/
Copy pathdocker-compose.standalone.yml
More file actions
55 lines (53 loc) · 1.83 KB
/
Copy pathdocker-compose.standalone.yml
File metadata and controls
55 lines (53 loc) · 1.83 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
# Single-container setup – backend and frontend run inside one container.
# Both ports (3000 backend, 3001 frontend) are exposed from the same container.
#
# Start: docker compose -f docker-compose.standalone.yml up -d
# Stop: docker compose -f docker-compose.standalone.yml down
#
# NOTE: VITE_API_URL is baked into the frontend at image-build time.
# If you need a custom backend URL, build the image yourself:
# docker build --build-arg VITE_API_URL=http://your-host:3000 -t invoice-builder .
# and replace the `image:` line below with `image: invoice-builder`.
services:
app:
image: ghcr.io/piratuks/invoice-builder:latest
# To build locally instead of pulling, uncomment the line below and remove the image: line above:
# build: .
extra_hosts:
- 'host.docker.internal:host-gateway'
container_name: invoice-builder
ports:
# backend internal-only, works only via nginx
# - '3000:3000'
- '3001:3001'
environment:
- SERVICE=all
- NODE_ENV=docker
- DB_DIRECTORY=/data
# Backend webserver port
- PORT=3000
# Backend webserver host
- DEV_SERVER_URL=0.0.0.0
# Frontend webserver URL
- FE_SERVER_URL=http://localhost:3001
# Path to migration files in docker volume
- MIGRATIONS_PATH=/app/dist-be/backend/server/shared/migrations
# nginx proxies /api/* to localhost (same container)
- BACKEND_HOST=localhost
- BACKEND_PORT=3000
volumes:
- app-data:/data
healthcheck:
test:
[
'CMD',
'node',
'-e',
"const net=require('net');const c=net.createConnection(3000,'localhost');c.on('connect',()=>{c.destroy();process.exit(0)});c.on('error',()=>process.exit(1))"
]
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
volumes:
app-data: