2023-03-20 15:35:58 +08:00
|
|
|
version: "3。4"
|
2023-03-20 10:10:17 +08:00
|
|
|
|
|
|
|
services:
|
2023-03-20 15:30:17 +08:00
|
|
|
|
|
|
|
nginx:
|
|
|
|
image: nginx:1.22
|
|
|
|
restart: always
|
|
|
|
container_name: backset-nginx
|
|
|
|
volumes:
|
|
|
|
- /www/wwwroot/backset/nginx/conf.d/:/etc/nginx/conf.d/
|
|
|
|
- /www/wwwroot/backset/nginx/ssl:/etc/nginx/ssl/
|
|
|
|
- /www/wwwroot/backset/nginx/html:/usr/share/nginx/html/
|
|
|
|
networks:
|
|
|
|
backset-net:
|
|
|
|
aliases:
|
|
|
|
- backset-nginx
|
|
|
|
|
2023-03-20 13:57:42 +08:00
|
|
|
mysql:
|
|
|
|
image: mysql:5.7
|
|
|
|
restart: always
|
|
|
|
container_name: backset-mysql
|
|
|
|
ports:
|
2023-03-20 14:59:52 +08:00
|
|
|
- "3307:3307"
|
2023-03-20 13:57:42 +08:00
|
|
|
environment:
|
2023-03-20 15:05:47 +08:00
|
|
|
MYSQL_DATABASE: backset
|
|
|
|
MYSQL_USER: backset
|
|
|
|
MYSQL_PASSWORD: backset
|
|
|
|
MYSQL_ROOT_PASSWORD: root
|
|
|
|
MYSQL_TCP_PORT: 3307
|
2023-03-20 13:57:42 +08:00
|
|
|
volumes:
|
2023-03-20 15:12:30 +08:00
|
|
|
- /www/wwwroot/backset/mysql/conf/my.cnf:/etc/mysql/conf.d/mysqld.cnf
|
|
|
|
- /www/wwwroot/backset/mysql/data:/var/lib/mysql
|
2023-03-20 15:30:17 +08:00
|
|
|
- /www/wwwroot/backset/mysql/logs:/var/log/mysqld
|
|
|
|
networks:
|
|
|
|
backset-net:
|
|
|
|
aliases:
|
|
|
|
- backset-mysql
|
2023-03-20 13:57:42 +08:00
|
|
|
|
|
|
|
redis:
|
|
|
|
image: redis
|
|
|
|
container_name: backset-redis
|
|
|
|
restart: always
|
|
|
|
ports:
|
2023-03-20 14:59:52 +08:00
|
|
|
- "26379:26379"
|
2023-03-20 13:57:42 +08:00
|
|
|
volumes:
|
2023-03-20 15:12:30 +08:00
|
|
|
- /www/wwwroot/backset/redis/conf:/etc/redis/redis.conf
|
|
|
|
- /www/wwwroot/backset/redis/data:/data
|
2023-03-20 14:42:11 +08:00
|
|
|
command: redis-server --requirepass "cr654654." --port 26379
|
2023-03-20 15:30:17 +08:00
|
|
|
networks:
|
|
|
|
backset-net:
|
|
|
|
aliases:
|
|
|
|
- backset-redis
|
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
|
2023-03-20 15:30:17 +08:00
|
|
|
expose:
|
|
|
|
- 7001
|
|
|
|
networks:
|
|
|
|
backset-net:
|
|
|
|
aliases:
|
|
|
|
- backset-server
|
2023-03-20 14:56:17 +08:00
|
|
|
links:
|
|
|
|
- mysql:mysql
|
|
|
|
- redis:redis
|
|
|
|
depends_on:
|
|
|
|
- mysql
|
2023-03-20 15:05:47 +08:00
|
|
|
- redis
|
2023-03-20 15:30:17 +08:00
|
|
|
- nginx
|
|
|
|
|
|
|
|
networks:
|
2023-03-20 15:34:31 +08:00
|
|
|
backset-net:
|
2023-03-20 15:35:01 +08:00
|
|
|
driver: bridge
|