-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (36 loc) · 905 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (36 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: '3.9'
services:
nginx:
build:
context: .
dockerfile: nginx.dockerfile
depends_on:
- php
- mysql
ports:
- 81:80 # host:container
- 444:443
volumes:
- ./wordpress:/var/www/html:delegated # host:container:mode
mysql:
image: mysql:latest
environment:
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
volumes:
- ./mysql:/var/lib/mysql:delegated # host:container:mode
php:
build:
context: .
dockerfile: php.dockerfile
volumes: # volumes means that the files are shared between the host and the container
- ./wordpress:/var/www/html:delegated # host:container:mode
wp:
build:
context: .
dockerfile: php.dockerfile
volumes:
- ./wordpress:/var/www/html:delegated
entrypoint: ['wp', '--allow-root']