Files
LabWise/docker-compose.yml
pulipakaa24 de2d90f265
All checks were successful
Deploy to Server / deploy (push) Successful in 1m26s
automate node version
2026-04-24 18:30:10 -05:00

63 lines
1.4 KiB
YAML

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: labwise
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: labwise_db
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U labwise -d labwise_db"]
interval: 5s
timeout: 5s
retries: 10
deploy:
resources:
limits:
memory: 256M
backend:
build:
context: .
dockerfile: Dockerfile.backend
args:
- NODE_VERSION=${NODE_VERSION:-25-alpine}
restart: unless-stopped
# Reads all vars from server/.env, then overrides the two that differ in Docker
env_file: ./server/.env
environment:
DATABASE_URL: postgresql://labwise:${POSTGRES_PASSWORD}@postgres:5432/labwise_db
UPLOADS_DIR: /app/uploads
volumes:
- uploads_data:/app/uploads
- ./server/AuthKey_A7ASKB9B7V.p8:/app/AuthKey_A7ASKB9B7V.p8:ro
depends_on:
postgres:
condition: service_healthy
deploy:
resources:
limits:
memory: 192M
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
- NODE_VERSION=${NODE_VERSION:-25-alpine}
restart: unless-stopped
ports:
- "5173:5173"
depends_on:
- backend
deploy:
resources:
limits:
memory: 48M
volumes:
postgres_data:
uploads_data: