117 lines
3.0 KiB
YAML
117 lines
3.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# MySQL Database
|
|
mysql:
|
|
image: mysql:8.0
|
|
container_name: auth-mysql
|
|
restart: unless-stopped
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: rootpassword123
|
|
MYSQL_DATABASE: device_fingerprint_auth
|
|
MYSQL_USER: auth_user
|
|
MYSQL_PASSWORD: auth_password123
|
|
ports:
|
|
- "23306:3306"
|
|
volumes:
|
|
- mysql_data:/var/lib/mysql
|
|
- ./src/main/resources/db/migration:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- auth-network
|
|
healthcheck:
|
|
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
|
timeout: 20s
|
|
retries: 10
|
|
|
|
# Spring Boot Application
|
|
app:
|
|
build: .
|
|
container_name: auth-app
|
|
restart: unless-stopped
|
|
ports:
|
|
- "2080:8080"
|
|
environment:
|
|
# Database Configuration
|
|
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/device_fingerprint_auth?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
|
SPRING_DATASOURCE_USERNAME: auth_user
|
|
SPRING_DATASOURCE_PASSWORD: auth_password123
|
|
|
|
# JPA Configuration
|
|
SPRING_JPA_HIBERNATE_DDL_AUTO: create-drop
|
|
SPRING_JPA_SHOW_SQL: true
|
|
SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT: org.hibernate.dialect.MySQL8Dialect
|
|
|
|
# Flyway Configuration - Disabled for container environments
|
|
SPRING_FLYWAY_ENABLED: false
|
|
|
|
# Application Configuration
|
|
SPRING_PROFILES_ACTIVE: demo
|
|
APP_ENVIRONMENT: development
|
|
|
|
# JWT Configuration
|
|
APP_JWT_SECRET: your-super-secret-jwt-key-that-should-be-at-least-256-bits-long-for-security
|
|
APP_JWT_ACCESS_TOKEN_EXPIRATION: 900
|
|
APP_JWT_REFRESH_TOKEN_EXPIRATION: 2592000
|
|
|
|
# Email Configuration (Demo Mode)
|
|
APP_EMAIL_ENABLED: true
|
|
APP_EMAIL_FROM_ADDRESS: noreply@company.com
|
|
APP_EMAIL_FROM_NAME: Auth Service
|
|
|
|
# SMS Configuration (Demo Mode)
|
|
APP_SMS_ENABLED: true
|
|
APP_SMS_PROVIDER: demo
|
|
|
|
# TOTP Configuration
|
|
APP_TOTP_ISSUER: AuthService
|
|
APP_TOTP_ENABLED: true
|
|
|
|
# GeoLocation Configuration
|
|
APP_GEOLOCATION_ENABLED: true
|
|
APP_GEOLOCATION_PROVIDER: demo
|
|
|
|
# Security Configuration
|
|
APP_DEVICE_FINGERPRINT_ENABLED: true
|
|
APP_TWO_FACTOR_ENABLED: true
|
|
|
|
# Demo Configuration
|
|
APP_DEMO_MODE: true
|
|
APP_DEMO_SHOW_CODES: true
|
|
|
|
depends_on:
|
|
mysql:
|
|
condition: service_healthy
|
|
networks:
|
|
- auth-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
|
|
# phpMyAdmin for database management (optional)
|
|
phpmyadmin:
|
|
image: phpmyadmin/phpmyadmin
|
|
container_name: auth-phpmyadmin
|
|
restart: unless-stopped
|
|
ports:
|
|
- "2081:80"
|
|
environment:
|
|
PMA_HOST: mysql
|
|
PMA_PORT: 3306
|
|
PMA_USER: auth_user
|
|
PMA_PASSWORD: auth_password123
|
|
depends_on:
|
|
- mysql
|
|
networks:
|
|
- auth-network
|
|
|
|
volumes:
|
|
mysql_data:
|
|
driver: local
|
|
|
|
networks:
|
|
auth-network:
|
|
driver: bridge
|