You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
services:
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: scales
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
backend:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
SECRET_KEY: ${SECRET_KEY}
|
|
DEBUG: "False"
|
|
ALLOWED_HOSTS: ${ALLOWED_HOSTS}
|
|
CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS}
|
|
DB_NAME: scales
|
|
DB_USER: postgres
|
|
DB_PASSWORD: ${DB_PASSWORD}
|
|
DB_HOST: postgres
|
|
DB_PORT: 5432
|
|
ports:
|
|
- "8101:8000"
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
REACT_APP_API_URL: ${REACT_APP_API_URL}
|
|
REACT_APP_SERIAL_URL: ${REACT_APP_SERIAL_URL}
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8100:80"
|
|
depends_on:
|
|
- backend
|
|
|
|
serial_bridge:
|
|
build:
|
|
context: .
|
|
dockerfile: serial_bridge/Dockerfile
|
|
restart: unless-stopped
|
|
environment:
|
|
HOST: "0.0.0.0"
|
|
COM_PORT: /tmp/vcom_read
|
|
BAUD_RATE: ${BAUD_RATE:-9600}
|
|
TEST_DATA_TYPE: ${TEST_DATA_TYPE:-scales}
|
|
SCALES_MIN: ${SCALES_MIN:-5000}
|
|
SCALES_MAX: ${SCALES_MAX:-20000}
|
|
DEBUG: "False"
|
|
ports:
|
|
- "8102:5000"
|
|
|
|
volumes:
|
|
postgres_data:
|