web-backset.cn/docker-compose.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2023-03-20 10:10:17 +08:00
version: "3"
services:
2023-03-20 13:57:42 +08:00
mysql:
image: mysql:5.7
restart: always
container_name: backset-mysql
ports:
2023-03-20 14:42:11 +08:00
- 3307:3307
2023-03-20 13:57:42 +08:00
environment:
2023-03-20 14:02:13 +08:00
- "MYSQL_DATABASE=backset"
- "MYSQL_USER=backset"
- "MYSQL_PASSWORD=backset"
- "MYSQL_ROOT_PASSWORD=root"
- "MYSQL_ROOT_HOST='%'"
2023-03-20 14:42:11 +08:00
- "MYSQL_TCP_PORT=3307"
2023-03-20 14:02:13 +08:00
- "TZ=Asia/Shanghai"
2023-03-20 13:57:42 +08:00
volumes:
- /www/wwwroot/mysql/conf/my.cnf:/etc/mysql/conf.d/mysqld.cnf
- /www/wwwroot/mysql/data:/var/lib/mysql
- /www/wwwroot/mysql/logs:/var/log/mysql
redis:
image: redis
container_name: backset-redis
restart: always
ports:
2023-03-20 14:42:11 +08:00
- 26379:26379
2023-03-20 13:57:42 +08:00
volumes:
- /www/wwwroot/redis/conf:/etc/redis/redis.conf
- /www/wwwroot/redis/data:/data
2023-03-20 14:42:11 +08:00
command: redis-server --requirepass "cr654654." --port 26379
2023-03-20 14:56:17 +08:00
web:
image: backset/server:1.0
build:
context: ./
dockerfile: Dockerfile.release
restart: always
container_name: backset-server
ports:
- 7001:7001
links:
- mysql:mysql
- redis:redis
depends_on:
- mysql
- redis