Create docker-compose.yml
This commit is contained in:
1 parent
fdfc7e0532
commit
01647e9350
1 file changed
+78
@@ -0,0 +1,78 @@
|
||||
networks:
|
||||
dev_network:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- ./conf.d:/etc/nginx/conf.d
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./certs:/etc/nginx/certs
|
||||
- ./html:/var/www/html
|
||||
networks:
|
||||
- dev_network
|
||||
|
||||
php:
|
||||
image: php:8.2-fpm
|
||||
container_name: php
|
||||
restart: always
|
||||
volumes:
|
||||
- ./html:/var/www/html
|
||||
networks:
|
||||
- dev_network
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0.23
|
||||
container_name: mysql
|
||||
restart: always
|
||||
ports:
|
||||
- 3306:3306
|
||||
volumes:
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
- ./mysql/conf.d:/etc/mysql/conf.d/
|
||||
- ./mysql/log:/var/log/mysql
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
|
||||
- MYSQL_USER=kennyyang
|
||||
- MYSQL_PASSWORD="!Ybw324!"
|
||||
networks:
|
||||
- dev_network
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
container_name: redis
|
||||
restart: always
|
||||
environment:
|
||||
- REDIS_PASSWORD="!Ybw324!"
|
||||
- REDIS_ALLOW_REMOTE_CONNECTIONS=yes
|
||||
ports:
|
||||
- 6379:6379
|
||||
volumes:
|
||||
- ./redis:/data
|
||||
- ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
|
||||
- ./redis/logs:/logs
|
||||
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
|
||||
networks:
|
||||
- dev_network
|
||||
|
||||
postgres:
|
||||
image: postgres:14
|
||||
container_name: postgresql
|
||||
restart: always
|
||||
environment:
|
||||
POSTGRES_USER: kennyyang
|
||||
POSTGRES_PASSWORD: "!Ybw324!"
|
||||
ALLOW_IP_RANGE: "0.0.0.0/0"
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- ./postgresql:/var/lib/postgresql
|
||||
networks:
|
||||
- dev_network
|
||||
Reference in new issue
Block a user