1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-26 10:43:35 +02:00

Sample for nginx-php-mysql

Signed-off-by: Joseph Barreca <jbarrec.tech@gmail.com>
This commit is contained in:
Joseph Barreca 2021-03-26 16:28:59 -04:00
parent a42a8531ab
commit 98b90b1d49
7 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,34 @@
version: "3.8"
services:
backend:
build: backend
secrets:
- db-password
depends_on:
- db
volumes:
- ./src:/var/www/html # this part seems repetitive (jb)
db:
image: mysql:8.0.19
command: '--default-authentication-plugin=mysql_native_password'
restart: always
secrets:
- db-password
volumes:
- db-data:/var/lib/mysql
environment:
- MYSQL_DATABASE=example
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
proxy:
build: proxy
ports:
- 80:80
depends_on:
- backend
volumes:
- ./src:/var/www/html # this part seems repetitive (jb)
volumes:
db-data:
secrets:
db-password:
file: db/password.txt