Files
print-calculator/docker-compose.deploy.yml
Joe Küng 3ca3f8e466
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 1m13s
Build, Test and Deploy / build-and-push (push) Successful in 14s
Build, Test and Deploy / deploy (push) Successful in 5s
feat(deploy): compose deploy fixed
2026-02-11 15:54:06 +01:00

39 lines
1.3 KiB
YAML

version: '3.8'
services:
backend:
# L'immagine usa il tag specificato nel file .env o passato da riga di comando
image: ${REGISTRY_URL}/${REPO_OWNER}/print-calculator-backend:${TAG}
container_name: print-calculator-backend-${ENV}
ports:
- "${BACKEND_PORT}:8000"
environment:
- FILAMENT_COST_PER_KG=${FILAMENT_COST_PER_KG}
- MACHINE_COST_PER_HOUR=${MACHINE_COST_PER_HOUR}
- ENERGY_COST_PER_KWH=${ENERGY_COST_PER_KWH}
- PRINTER_POWER_WATTS=${PRINTER_POWER_WATTS}
- MARKUP_PERCENT=${MARKUP_PERCENT}
- SPRING_DATASOURCE_URL=${DB_URL}
- SPRING_DATASOURCE_USERNAME=${DB_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${DB_PASSWORD}
- TEMP_DIR=/app/temp
- PROFILES_DIR=/app/profiles
restart: always
volumes:
- backend_profiles_${ENV}:/app/profiles
command: ["sh", "-c", "echo 'DB_URL IS: $DB_URL'; java -jar app.jar --spring.datasource.url=${DB_URL} --spring.datasource.username=${DB_USERNAME} --spring.datasource.password=${DB_PASSWORD}"]
frontend:
image: ${REGISTRY_URL}/${REPO_OWNER}/print-calculator-frontend:${TAG}
container_name: print-calculator-frontend-${ENV}
ports:
- "${FRONTEND_PORT}:8008"
depends_on:
- backend
restart: always
volumes:
backend_profiles_prod:
backend_profiles_int:
backend_profiles_dev: