35 lines
764 B
YAML
35 lines
764 B
YAML
version: '3'
|
|
services:
|
|
mysql:
|
|
image: mysql:5.6
|
|
hostname: "mysql"
|
|
container_name: mysql
|
|
command: --default-authentication-plugin=mysql_native_password
|
|
restart: always
|
|
environment:
|
|
MYSQL_ROOT_PASSWORD: root
|
|
MYSQL_DATABASE: app
|
|
MYSQL_USER: app
|
|
MYSQL_PASSWORD: app
|
|
volumes:
|
|
- /opt/mysql:/var/lib/mysql
|
|
- ./dbinit:/docker-entrypoint-initdb.d
|
|
ports:
|
|
- "3306:3306"
|
|
|
|
|
|
app:
|
|
build:
|
|
context: ..
|
|
dockerfile: ./cicd/app/Dockerfile
|
|
restart: always
|
|
environment:
|
|
APP_SERVER_ADDRESS: 0.0.0.0
|
|
APP_SERVER_PORT: 8080
|
|
APP_DSN_HOST: mysql
|
|
APP_DSN_PORT: 3306
|
|
APP_DSN_USER: app
|
|
APP_DSN_PASS: app
|
|
APP_DSN_BASE: app
|
|
ports:
|
|
- "8080:8080" |