think/docker-compose.yml

61 lines
1.2 KiB
YAML
Raw Normal View History

2022-06-28 12:26:30 +00:00
version: '3'
2022-05-22 10:03:56 +00:00
services:
2022-06-28 12:26:30 +00:00
think:
2022-05-22 10:03:56 +00:00
build:
context: .
image: think
2022-06-28 12:26:30 +00:00
container_name: think
2022-05-22 10:03:56 +00:00
volumes:
2022-06-28 12:26:30 +00:00
- ./config:/app/config
- ./runtime/static:/app/packages/server/static
2022-05-22 10:03:56 +00:00
environment:
- TZ=Asia/Shanghai
2022-08-05 11:36:09 +00:00
expose:
- '5001-5003'
2022-05-22 10:03:56 +00:00
ports:
2022-06-28 12:26:30 +00:00
- '5001-5003:5001-5003'
2022-05-22 10:03:56 +00:00
depends_on:
- mysql
2022-06-28 12:26:30 +00:00
- redis
networks:
- think
2022-05-22 10:03:56 +00:00
mysql:
image: mysql:5.7
2022-06-28 12:26:30 +00:00
restart: always
container_name: mysql-for-think
2022-05-22 10:03:56 +00:00
volumes:
2022-06-28 12:26:30 +00:00
- ./runtime/mysql:/var/lib/mysql
2022-05-22 10:03:56 +00:00
environment:
- TZ=Asia/Shanghai
2022-06-28 12:26:30 +00:00
- MYSQL_ROOT_PASSWORD=root
2022-05-22 10:03:56 +00:00
- MYSQL_DATABASE=think
2022-06-28 12:26:30 +00:00
- MYSQL_USER=think
- MYSQL_PASSWORD=think
2022-05-22 10:03:56 +00:00
expose:
2022-06-28 12:26:30 +00:00
- '3306'
2022-05-22 10:03:56 +00:00
ports:
2022-06-28 12:26:30 +00:00
- '3306:3306'
2022-05-22 10:03:56 +00:00
command:
2022-06-28 12:26:30 +00: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