Update docker-compose.yml

This commit is contained in:
Kenny Yang authored and GitHub committed 2024-05-22 17:23:27 +08:00
1 parent 01647e9350
commit 3eead8fa95
1 file changed
+7 -4
+7 -4
View File
@@ -19,7 +19,9 @@ services:
- dev_network - dev_network
php: php:
image: php:8.2-fpm build:
context: .
dockerfile: Dockerfile
container_name: php container_name: php
restart: always restart: always
volumes: volumes:
@@ -32,11 +34,12 @@ services:
container_name: mysql container_name: mysql
restart: always restart: always
ports: ports:
- 3306:3306 - 9306:3306
volumes: volumes:
- ./mysql/data:/var/lib/mysql - ./mysql/data:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d/ - ./mysql/conf.d:/etc/mysql/conf.d/
- ./mysql/log:/var/log/mysql - ./mysql/log:/var/log/mysql
- ./mysql/conf.d/init.sql:/docker-entrypoint-initdb.d/init.sql
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
environment: environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes - MYSQL_ALLOW_EMPTY_PASSWORD=yes
@@ -53,7 +56,7 @@ services:
- REDIS_PASSWORD="!Ybw324!" - REDIS_PASSWORD="!Ybw324!"
- REDIS_ALLOW_REMOTE_CONNECTIONS=yes - REDIS_ALLOW_REMOTE_CONNECTIONS=yes
ports: ports:
- 6379:6379 - 9379:6379
volumes: volumes:
- ./redis:/data - ./redis:/data
- ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf - ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
@@ -71,7 +74,7 @@ services:
POSTGRES_PASSWORD: "!Ybw324!" POSTGRES_PASSWORD: "!Ybw324!"
ALLOW_IP_RANGE: "0.0.0.0/0" ALLOW_IP_RANGE: "0.0.0.0/0"
ports: ports:
- "5432:5432" - 9332:5432
volumes: volumes:
- ./postgresql:/var/lib/postgresql - ./postgresql:/var/lib/postgresql
networks: networks: