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:
parent
a42a8531ab
commit
98b90b1d49
7 changed files with 141 additions and 0 deletions
34
nginx-php-mysql/docker-compose.yaml
Normal file
34
nginx-php-mysql/docker-compose.yaml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue