Add a docker build step.
All checks were successful
All checks were successful
This commit is contained in:
parent
ff6837a751
commit
3246203805
10 changed files with 205 additions and 24 deletions
36
docker-compose.yml
Normal file
36
docker-compose.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- DATABASE_URL=sqlite:///app/data/local.db
|
||||
- RUST_LOG=info
|
||||
volumes:
|
||||
- backend_data:/app/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5173:5173"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- VITE_API_URL=http://localhost:3000
|
||||
- API_URL=http://backend:3000
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue