-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
45 lines (44 loc) · 1.25 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
version: '3'
services:
db-headless:
build:
context: ./
dockerfile: DockerfileDB
container_name: db-headless
environment:
- MYSQL_ROOT_PASSWORD=root123
- MYSQL_DATABASE=${WORDPRESS_DB_NAME}
- MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD}
- MYSQL_USER=${WORDPRESS_DB_USER}
# image: mariadb
user: 1000:1000
volumes:
- $PWD/docker/db_data:/var/lib/mysql
ports:
- '3307:3306'
wp-headless:
build: .
command: bash -c 'install_wordpress && apache2-foreground'
container_name: wp-headless
depends_on:
- db-headless
env_file: ./.env
ports:
- '8080:8080'
user: 1000:1000
volumes:
- ./wordpress:/var/www/html
- ./docker/install_wordpress.sh:/usr/local/bin/install_wordpress
- ./docker/plugins:/var/www/plugins
frontend:
command: bash -c 'npm i && npm start'
container_name: frontend
expose:
- '3000'
image: node
ports:
- '3000:3000'
user: node
volumes:
- ./frontend:/home/node/app
working_dir: /home/node/app