-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
126 lines (119 loc) · 4.77 KB
/
docker-compose.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
version: '2'
# CONFIGURATION NOTES:
#
# * wp-theme: If you have your theme in a repo, then you can use the
# `gh-theme` container to clone it automatically via the REPO or
# REPO_NAME variables.
#
# If you don't want to use Ionata's composer (probably) - comment
# out the USE_IONATA_COMPOSER line and maybe the `~/.aws` volume
# share.
#
# * wordpress: Comment or remove the `wp-theme` dependency, plus the ./vendor
# volume, if you are not going to use the above container.
#
# If you edit your `/etc/hosts` file and want to run multiple
# websites at once, then edit WP_HOME variable to point to the
# desired domain name from your hosts file.
#
# * db: If you want to use different credentials, then make sure to update
# the ones in the `wordpress` container as well.
#
# When a container is started for the first time, a new database with
# the specified name will be created and initialized with the provided
# configuration variables. Furthermore, it will execute files with
# extensions .sh, .sql and .sql.gz that are found in `./db`. Files will
# be executed in alphabetical order.
#
# * nginx: In case you run multiple websites at once, but you leave them at
# `localhost`, then you have to have a different port for each of
# them.
#
# If you have multiple configurations with different ports, then you
# will have to expose them under `ports`.
services:
wp-theme:
# build: ./docker-compose/aws-theme
build: ./docker-compose/gh-theme
volumes:
- ~/.ssh:/root/.ssh
# - ~/.aws:/root/.aws
- .:/project
environment:
# REPO: "ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/wp-theme-..." # add theme name or use below
REPO: "https://github.com/ionata/wp-theme-..." # add theme name or use below
BASE_PATH: "wp-content/themes"
# USE_IONATA_COMPOSER: "true"
# THEME_DIRNAME: "defaults_to_REPO_NAME"
# REPO_NAME: wp-theme-...
# AWS_DEFAULT_REGION: us-east-1
wordpress:
depends_on:
- wp-theme
- db
- maildev
image: wordpress:5.7.2-php7.4-fpm-alpine
# build: ./docker-compose/custom-wp
volumes:
# - ./wordpress:/var/www/html
- ./wp-content:/var/www/html/wp-content
- ./docker-compose/wp-dev:/var/www/html/wp-dev
- ./docker-compose/wp-dev/php.uploads.ini:/usr/local/etc/php/conf.d/php.uploads.ini
- ./docker-compose/wp-dev/apache2-hack--wp-dev-inject.sh:/usr/local/bin/apache2-hack--wp-dev-inject.sh
- ./vendor:/var/www/html/vendor
command: ["apache2-hack--wp-dev-inject.sh"]
# restart: always
environment:
MYSQL_PORT_3306_TCP: "tcp://db:3306"
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress # essentially copy the db parameters
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
# WORDPRESS_TABLE_PREFIX: "wp_" # only set if you need to override the default one - "wp_"
# === wp-dev ===
# WP_HOME: "http://localhost:8080"
# WP_SITEURL: "" # defaults to WP_HOME
# WP_OUTPUT_REPLACE: "https://www.domain.com => http://localhost:8080 | https://xyz.cloudfront.net/uploads => http://localhost:8080/wp-content/uploads"
# ^ String replacement of produced HTML
# DISABLE_WP_CRON: 1 # defaults to 0 (false)
# WP_CORE_DIR: "/var/www/html" # path to WordPress
# === fetch ===
# FETCH_ENABLED: 1
# FETCH_REMOTE_SERVER_UPLOADS_URL: "http://domain.com.au/wp-content/uploads/"
# FETCH_FOR_ADMINS_ONLY: 0
# FETCH_LIMIT_RESPONSE_SIZE: 20971520 # 20 mega bytes
# FETCH_LIMIT_RESPONSE_TIME: 60 # 60 seconds
SMTP_HOST: maildev
maildev:
image: djfarrelly/maildev
ports:
- "1080:80"
adminer:
depends_on:
- db
image: adminer
ports:
- "2080:8080"
db:
image: mariadb:10.6
volumes:
- ./var/db:/var/lib/mysql
- ./db:/docker-entrypoint-initdb.d
# - ./docker-compose/db/mariadb.conf.d:/etc/mysql/mariadb.conf.d
# restart: always
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
nginx:
depends_on:
- wordpress
image: nginx:1.21-alpine
volumes_from:
- wordpress
volumes:
- ./docker-compose/nginx/conf.d:/etc/nginx/conf.d
ports:
- "8080:80"
# restart: always