version: "3" services: mysql: image: mysql:5.7 restart: always container_name: backset-mysql ports: - "3307:3307" environment: MYSQL_DATABASE: backset MYSQL_USER: backset MYSQL_PASSWORD: backset MYSQL_ROOT_PASSWORD: root MYSQL_TCP_PORT: 3307 TZ: Asia/Shanghai LANG: C.UTF-8 command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_general_ci' ] volumes: - /www/wwwroot/backset/mysql/conf/my.cnf:/etc/mysql/conf.d/mysqld.cnf - /www/wwwroot/backset/mysql/data:/var/lib/mysql - /www/wwwroot/backset/mysql/logs:/var/log/mysqld networks: mozzie.cn-net: aliases: - backset-mysql redis: image: redis container_name: backset-redis restart: always ports: - "26379:26379" volumes: - /www/wwwroot/backset/redis/conf:/etc/redis/redis.conf - /www/wwwroot/backset/redis/data:/data command: redis-server --requirepass "cr654654." --port 26379 networks: mozzie.cn-net: aliases: - backset-redis server: image: backset/server:1.0 build: context: ./ dockerfile: Dockerfile.release restart: always container_name: backset-server ports: - 7001:7001 expose: - 7001 networks: mozzie.cn-net: aliases: - backset-server # links: # - mysql:mysql # - redis:redis depends_on: - mysql - redis networks: mozzie.cn-net: external: true