-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (62 loc) · 1.52 KB
/
docker-compose.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3'
networks:
project_network:
name: ${COMPOSE_PROJECT_NAME}_network
services:
site:
build:
context: .
dockerfile: nginx.dockerfile
args:
- PROJECT_DOMAIN=${PROJECT_DOMAIN}
container_name: nginx_${COMPOSE_PROJECT_NAME}
ports:
- ${HTTP_PORT}:80
- ${HTTPS_PORT}:443
volumes:
- ./wordpress:/var/www/html:delegated
depends_on:
- php
- mysql
environment:
- PROJECT_DOMAIN=${PROJECT_DOMAIN}
- HTTP_PORT=${HTTP_PORT}
- HTTPS_PORT=${HTTPS_PORT}
networks:
- project_network
mysql:
image: arm64v8/mysql:8.0
container_name: mysql_${COMPOSE_PROJECT_NAME}
restart: always
ports:
- ${MYSQL_PORT}:3306
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
SERVICE_TAGS: dev
SERVICE_NAME: $DB_HOST
networks:
- project_network
php:
build:
context: .
dockerfile: php.dockerfile
container_name: php_${COMPOSE_PROJECT_NAME}
volumes:
- ./wordpress:/var/www/html:delegated
networks:
- project_network
wp:
build:
context: .
dockerfile: php.dockerfile
container_name: wp_${COMPOSE_PROJECT_NAME}
entrypoint: ['wp', '--allow-root']
volumes:
- ./wordpress:/var/www/html:delegated
networks:
- project_network