mirror of
https://github.com/tl-open-source/tl-rtc-file.git
synced 2025-12-24 13:38:06 +08:00
59 lines
1.2 KiB
YAML
59 lines
1.2 KiB
YAML
## build the image from the Dockerfile in the current directory
|
|
## 用于自己通过代码构建镜像并启动
|
|
|
|
version: '3'
|
|
services:
|
|
|
|
api:
|
|
container_name: api
|
|
build:
|
|
context: ./../
|
|
dockerfile: ./Dockerfile
|
|
env_file:
|
|
- ../tlrtcfile.env
|
|
command:
|
|
- tlapi
|
|
ports:
|
|
- 9092:9092
|
|
links:
|
|
- mysql
|
|
depends_on:
|
|
- mysql
|
|
volumes:
|
|
- ../tlrtcfile.env:/tlrtcfile/tlrtcfile.env
|
|
|
|
socket:
|
|
container_name: socket
|
|
build:
|
|
context: ./../
|
|
dockerfile: ./Dockerfile
|
|
command:
|
|
- tlsocket
|
|
env_file:
|
|
- ../tlrtcfile.env
|
|
ports:
|
|
- 8444:8444
|
|
links:
|
|
- mysql
|
|
depends_on:
|
|
- mysql
|
|
volumes:
|
|
- ../tlrtcfile.env:/tlrtcfile/tlrtcfile.env
|
|
|
|
mysql:
|
|
container_name: mysql
|
|
restart: always
|
|
env_file:
|
|
- ./mysql/mysql.env
|
|
build:
|
|
context: ./mysql/
|
|
dockerfile: ./Dockerfile
|
|
ports:
|
|
- 3306:3306
|
|
volumes:
|
|
- ./mysql/data/mysql.env:/tlrtcfile/docker/mysql/mysql.env
|
|
- ./mysql/data/db:/var/lib/mysql
|
|
- ./mysql/data/my.cnf:/etc/mysql/conf.d/my.cnf
|
|
- ./mysql/data/log:/var/log/mysql
|
|
- ./mysql/data/init.sql:/docker-entrypoint-initdb.d/init.sql
|