web-backset.cn/docker-compose.yml

58 lines
1.2 KiB
YAML
Raw Normal View History

2023-03-20 10:10:17 +08:00
version: "3"
services:
web:
2023-03-20 13:13:18 +08:00
image: backset/server:1.0
2023-03-20 13:16:18 +08:00
build:
context: ./
dockerfile: Dockerfile.release
2023-03-20 10:10:17 +08:00
restart: always
2023-03-20 13:57:42 +08:00
container_name: backset-server
2023-03-20 10:10:17 +08:00
ports:
2023-03-20 13:59:28 +08:00
- 7001:7001
2023-03-20 13:31:51 +08:00
networks:
2023-03-20 13:57:42 +08:00
backset-net:
2023-03-20 13:31:51 +08:00
aliases:
- backset-server
2023-03-20 13:46:41 +08:00
2023-03-20 13:57:42 +08:00
mysql:
image: mysql:5.7
restart: always
container_name: backset-mysql
ports:
2023-03-20 13:59:28 +08:00
- 46033:3306
2023-03-20 13:57:42 +08:00
environment:
2023-03-20 13:59:28 +08:00
- MYSQL_DATABASE: backset
- MYSQL_USER: backset
- MYSQL_PASSWORD: backset
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
networks:
backset-net:
aliases:
- backset-mysql
redis:
image: redis
container_name: backset-redis
restart: always
ports:
2023-03-20 13:59:28 +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
command: redis-server --appendonly yes --requirepass "cr654654."
networks:
backset-net:
aliases:
- backset-redis
2023-03-20 13:46:41 +08:00
networks:
2023-03-20 13:57:42 +08:00
backset-net:
ipam:
driver: default
config:
- subnet: "172.16.238.0/24"
- subnet: "2001:3984:3989::/64"