docker-compose.yml

This commit is contained in:
glovetleong
2022-10-27 00:52:21 +08:00
parent 5a199fccb4
commit 9a10919f4c
2 changed files with 51 additions and 1 deletions
+51
View File
@@ -0,0 +1,51 @@
version: '3'
networks:
exchange-staging:
services:
#################################################################
nginx:
image: nginx:stable-alpine
container_name: exchange-ngnix
ports:
- "8081:80"
volumes:
- ../:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- mysql
networks:
- exchange-staging
#################################################################
mysql:
image: mysql:5.7.29
container_name: exchange-mysql
restart: unless-stopped
tty: true
ports:
- 3307:3306
environment:
MYSQL_ROOT_USER: root
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: exchange-db
MYSQL_USER: master
MYSQL_PASSWORD: cDe7gcrRBWetaAP
volumes:
- /var/docker/lib/mysql:/var/lib/mysql
networks:
- exchange-staging
#################################################################
php:
build:
context: .
dockerfile: Dockerfile
container_name: exchange-php
volumes:
- ../:/var/www/html
ports:
- "9001:9000"
networks:
- exchange-staging
#################################################################