Files
newsnow/docker-compose.local.yml
T
f8579bbe4f fix: mysql in docker (#216)
* fix(database): Implement dynamic database connector selection

* refactor: Convert database detection messages to English

* chore: add mysql2 dependency

* Update docker-compose.yml

---------

Co-authored-by: Ou <[email protected]>
2025-08-12 23:21:35 +08:00

48 lines
1.2 KiB
YAML

version: '3'
services:
newsnow:
build: .
ports:
- '4444:4444'
volumes:
- newsnow_data:/usr/app/.data
environment:
- G_CLIENT_ID=
- G_CLIENT_SECRET=
- JWT_SECRET=
- INIT_TABLE=true
- ENABLE_CACHE=true
# MySQL Database Configuration (uncomment to use MySQL instead of SQLite)
# - MYSQL_HOST=newsnow_mysql
# - MYSQL_PORT=3306
# - MYSQL_USER=newsnow
# - MYSQL_PASSWORD=your_password
# - MYSQL_DATABASE=newsnow
# - MYSQL_SSL=false
# Uncomment the following lines to use MySQL database
# depends_on:
# - mysql
# Uncomment the following service to use MySQL database
# mysql:
# image: mysql:8.0
# container_name: newsnow_mysql
# restart: always
# environment:
# MYSQL_ROOT_PASSWORD: root_password
# MYSQL_DATABASE: newsnow
# MYSQL_USER: newsnow
# MYSQL_PASSWORD: your_password
# ports:
# - "3306:3306"
# volumes:
# - mysql_data:/var/lib/mysql
# command: --default-authentication-plugin=mysql_native_password
volumes:
newsnow_data:
name: newsnow_data
# mysql_data:
# name: newsnow_mysql_data