39 lines
840 B
YAML
39 lines
840 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.production
|
|
ports:
|
|
- "80:3000"
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
NODE_ENV: production
|
|
DB_NAME: ${DB_NAME}
|
|
DB_USER: ${DB_USER}
|
|
DB_PASS: ${DB_PASS}
|
|
DB_HOST: db
|
|
TZ: Asia/Tokyo
|
|
volumes:
|
|
- ./public/thumbnails:/app/public/thumbnails
|
|
- ./logs/app:/app/logs
|
|
restart: always
|
|
db:
|
|
image: mysql:8.0
|
|
volumes:
|
|
- db-store-prodcution:/var/lib/mysql
|
|
- ./logs/db:/var/log/mysql
|
|
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
environment:
|
|
MYSQL_DATABASE: ${DB_NAME}
|
|
MYSQL_USER: ${DB_USER}
|
|
MYSQL_PASSWORD: ${DB_PASS}
|
|
MYSQL_ROOT_PASSWORD: ${DB_PASS}
|
|
TZ: ${TZ}
|
|
ports:
|
|
- ${DB_PORT}:3306
|
|
restart: always
|
|
|
|
volumes:
|
|
db-store-prodcution:
|