Files
gongxue-base/docker-compose.yml

47 lines
1.0 KiB
YAML

version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: dorm_billing_mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: dorm_billing_2024
MYSQL_DATABASE: dorm_billing
MYSQL_CHARSET: utf8mb4
MYSQL_COLLATION: utf8mb4_unicode_ci
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
backend:
build: ./apps/server
container_name: dorm_billing_backend
restart: always
ports:
- "3000:3000"
environment:
DB_HOST: mysql
DB_PORT: 3306
DB_USERNAME: root
DB_PASSWORD: dorm_billing_2024
DB_DATABASE: dorm_billing
JWT_SECRET: dorm-billing-jwt-secret-key-2024
JWT_EXPIRES_IN: 24h
depends_on:
- mysql
frontend:
build: ./apps/admin
container_name: dorm_billing_frontend
restart: always
ports:
- "80:80"
depends_on:
- backend
volumes:
mysql_data: