Files
toho-miku/docker-compose.yml
Jan Groß f1e01f2a9f API: Add experimental Json API
in preparation for external healthchecks and the
admin backend. We define a couple test routes:

- / List all routes
- /ping Replies pong for online-checks
- /stats Get high-level bot statistics
- /most-recent-drop Returns the most recent entry from dropHistories

The last two routes require a valid apikey header.
All routes are prefixed by /api/v1
2023-04-05 12:00:46 +02:00

32 lines
881 B
YAML

version: "3.7"
services:
bot:
build: .
command: sh -c "npm config set cache /app/.npm_cache --global && npm install && npx sequelize db:migrate && node ."
restart: unless-stopped
environment:
- TZ=Europe/Berlin
depends_on:
- "mysql"
working_dir: /app
ports:
- 127.0.0.1:${API_PORT}:${API_PORT}
volumes:
- ./:/app
- /usr/share/fonts/:/usr/share/fonts/
mysql:
image: mysql:8.0
restart: unless-stopped
ports:
- ${DB_PORT}:3306
volumes:
- ./data/db:/var/lib/mysql
environment:
- TZ=Europe/Berlin
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
- LANG=C.UTF-8
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci