123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- version : '3'
- services:
- mysql:
- # platform: linux/x86_64
- container_name: mysql
- image: mysql:5.7
- build:
- context: .
- dockerfile: mysql-dockerfile
- ports:
- - "3306:3306"
- volumes:
- - ./mysql/conf:/etc/mysql/conf.d
- - ./mysql/logs:/logs
- - ./mysql/data:/var/lib/mysql
- command: [
- 'mysqld',
- '--innodb-buffer-pool-size=80M',
- '--character-set-server=utf8mb4',
- '--collation-server=utf8mb4_unicode_ci',
- '--default-time-zone=+8:00',
- '--lower-case-table-names=1'
- ]
- environment:
- MYSQL_DATABASE: ${DB_NAME}
- MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
- redis:
- image: redis:5.0
- ports:
- - "6379:6379"
- restart: always
- zyc-server:
- container_name: zyc-server
- build:
- context: .
- dockerfile: zyc-dockerfile
- ports:
- - "80:80"
- volumes:
- - ./zyc/logs:/home/zyc/logs
- - ./zyc/uploadPath:/home/zyc/uploadPath
- depends_on:
- - mysql
- links:
- - mysql
- environment:
- DB_HOST: ${DB_HOST}
- DB_USERNAME: ${DB_USERNAME}
- DB_PASSWORD: ${DB_PASSWORD}
- DB_NAME: ${DB_NAME}
- DB_PORT: ${DB_PORT}
- REDIS_HOST: ${REDIS_HOST}
- REDIS_PORT: ${REDIS_PORT}
- REDIS_PASSWORD: ${REDIS_PASSWORD}
- REDIS_DATABASE: ${REDIS_DATABASE}
|