35 lines
904 B
YAML
35 lines
904 B
YAML
|
version: '3.0'
|
||
|
services:
|
||
|
thream-api:
|
||
|
container_name: ${COMPOSE_PROJECT_NAME}
|
||
|
build:
|
||
|
context: './'
|
||
|
dockerfile: './Dockerfile.production'
|
||
|
environment:
|
||
|
PORT: ${PORT}
|
||
|
env_file: './.env'
|
||
|
ports:
|
||
|
- '${PORT}:${PORT}'
|
||
|
depends_on:
|
||
|
- ${DATABASE_HOST}
|
||
|
volumes:
|
||
|
- './uploads:/api/uploads'
|
||
|
restart: 'unless-stopped'
|
||
|
|
||
|
thream-database:
|
||
|
container_name: ${DATABASE_HOST}
|
||
|
image: 'mysql:8.0.23'
|
||
|
command: '--default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci'
|
||
|
environment:
|
||
|
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
|
||
|
MYSQL_DATABASE: ${DATABASE_NAME}
|
||
|
MYSQL_TCP_PORT: ${DATABASE_PORT}
|
||
|
ports:
|
||
|
- '${DATABASE_PORT}:${DATABASE_PORT}'
|
||
|
volumes:
|
||
|
- 'database-volume:/var/lib/mysql'
|
||
|
restart: 'unless-stopped'
|
||
|
|
||
|
volumes:
|
||
|
database-volume:
|