think/docker-compose.yml

59 lines
1.1 KiB
YAML
Raw Normal View History

2022-06-28 20:26:30 +08:00
version: '3'
2022-05-22 18:03:56 +08:00
services:
2022-06-28 20:26:30 +08:00
think:
2022-05-22 18:03:56 +08:00
build:
context: .
image: think
2022-06-28 20:26:30 +08:00
container_name: think
2022-05-22 18:03:56 +08:00
volumes:
2022-06-28 20:26:30 +08:00
- ./config:/app/config
- ./runtime/static:/app/packages/server/static
2022-05-22 18:03:56 +08:00
environment:
- TZ=Asia/Shanghai
ports:
2022-06-28 20:26:30 +08:00
- '5001-5003:5001-5003'
2022-05-22 18:03:56 +08:00
depends_on:
- mysql
2022-06-28 20:26:30 +08:00
- redis
networks:
- think
2022-05-22 18:03:56 +08:00
mysql:
image: mysql:5.7
2022-06-28 20:26:30 +08:00
restart: always
container_name: mysql-for-think
2022-05-22 18:03:56 +08:00
volumes:
2022-06-28 20:26:30 +08:00
- ./runtime/mysql:/var/lib/mysql
2022-05-22 18:03:56 +08:00
environment:
- TZ=Asia/Shanghai
2022-06-28 20:26:30 +08:00
- MYSQL_ROOT_PASSWORD=root
2022-05-22 18:03:56 +08:00
- MYSQL_DATABASE=think
2022-06-28 20:26:30 +08:00
- MYSQL_USER=think
- MYSQL_PASSWORD=think
2022-05-22 18:03:56 +08:00
expose:
2022-06-28 20:26:30 +08:00
- '3306'
2022-05-22 18:03:56 +08:00
ports:
2022-06-28 20:26:30 +08:00
- '3306:3306'
2022-05-22 18:03:56 +08:00
command:
2022-06-28 20:26:30 +08:00
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
networks:
- think
redis:
image: redis:latest
restart: always
container_name: redis-for-think
command: >
--requirepass root
expose:
- '6379'
ports:
- '6379:6379'
volumes:
- ./runtime/redis:/data
privileged: true
networks:
- think
networks:
think:
driver: bridge