Files
Parking/docker-compose.yml
2026-06-03 14:47:35 +02:00

49 lines
1.1 KiB
YAML

services:
db:
image: mariadb:10.11
container_name: smartparking-db
restart: always
environment:
MARIADB_ROOT_PASSWORD: rootpassword
MARIADB_DATABASE: smartparking
MARIADB_USER: smartparking_user
MARIADB_PASSWORD: smartparking_pass
volumes:
- db_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- smartparking-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 10s
retries: 5
app:
build: .
container_name: smartparking-app
restart: always
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: db
DB_PORT: 3306
DB_USER: smartparking_user
DB_PASSWORD: smartparking_pass
DB_NAME: smartparking
JWT_SECRET: une_chaine_tres_longue_et_secrete
NODE_ENV: production
MQTT_HOST: 172.18.0.1
MQTT_PORT: 1883
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- smartparking-network
volumes:
db_data:
networks:
smartparking-network: