version: '3.8' services: # Next.js application app: build: context: . dockerfile: Dockerfile ports: - "3000:3000" volumes: - .:/app - /app/node_modules environment: - NODE_ENV=development - DB_TYPE=sqlite # Change to mysql or postgres to use those databases depends_on: - mysql - postgres # MySQL database mysql: image: mysql:8.0 ports: - "3306:3306" environment: - MYSQL_ROOT_PASSWORD=password - MYSQL_DATABASE=kantancms - MYSQL_USER=kantancms - MYSQL_PASSWORD=password volumes: - mysql_data:/var/lib/mysql command: --default-authentication-plugin=mysql_native_password # PostgreSQL database postgres: image: postgres:15 ports: - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=password - POSTGRES_DB=kantancms volumes: - postgres_data:/var/lib/postgresql/data volumes: mysql_data: postgres_data: