wslave 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/base/config/deploy/production.rb +4 -2
- data/base/config/deploy/staging.rb +4 -2
- data/base/docker/apache/Dockerfile +1 -1
- data/base/docker/nginx/Dockerfile +32 -12
- data/base/docker/nginx/nginx.vhost +1 -1
- data/base/docker/nginx/php.ini +0 -874
- data/base/docker/nginx/supervisord.conf +1 -1
- data/base/docker/nginx/wp-cli.yml +9 -0
- data/base/docker-compose.yml +2 -0
- data/base/public/wp-config.php +18 -41
- data/base/wp-cli.yml +8 -0
- data/bin/wslave +14 -2
- data/lib/wslave_docker.rb +1 -1
- data/lib/wslave_tools.rb +28 -13
- data/wslave.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae8f5b776137111cf2c79936a1f7bc17126fe3a884441865cf5fa8895305a9ee
|
4
|
+
data.tar.gz: 9a604e9920dd201fec828720230c61036d933ac17625824f8148590864038ee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cd61b1d6aed6bde6295cd27bc6d268373cb9e2a63ffc35dfaad03fb209395d209a95d45944f66eb24c588c508f546b944b2b6afb820f89fac5e960c0b36064c
|
7
|
+
data.tar.gz: 108c3f32c3fd2b2671889002f003a9c866e3a03f3757b75eac0863fad877bffbec35e660f7f31390e25a41d3a603b84b375022e4b9df2237f2f790b54acbd91d
|
@@ -137,10 +137,10 @@ namespace :deploy do
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
desc 'Finds and replaces localhost:8000
|
140
|
+
desc 'Finds and replaces localhost:8000 / localhost:8001and your Staging address with the Production address'
|
141
141
|
task :chikan do
|
142
142
|
on roles(:web) do
|
143
|
-
puts 'Replacing localhost:8000 and
|
143
|
+
puts 'Replacing localhost:8000 / localhost:8001 and Staging URLs with Production URLs...'
|
144
144
|
|
145
145
|
# Set an anchor to first homogonize instances of URL's, then replace all the anchors
|
146
146
|
anchor = "URL_REPLACEMENT_ANCHOR_00000"
|
@@ -167,6 +167,8 @@ namespace :deploy do
|
|
167
167
|
# Set localhost entries to the anchor
|
168
168
|
db_data = db_data.gsub(/localhost\%3A8000/, anchor)
|
169
169
|
db_data = db_data.gsub(/localhost:8000/, anchor)
|
170
|
+
db_data = db_data.gsub(/localhost\%3A8001/, anchor)
|
171
|
+
db_data = db_data.gsub(/localhost:8001/, anchor)
|
170
172
|
|
171
173
|
# Replace anchors with the correct target URL
|
172
174
|
db_data = db_data.gsub(anchor, "#{opts['deployer']['fqdn']['production']}")
|
@@ -137,10 +137,10 @@ namespace :deploy do
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
desc 'Finds and replaces localhost:8000 and your Production address with the Staging address'
|
140
|
+
desc 'Finds and replaces localhost:8000 / localhost:8001 and your Production address with the Staging address'
|
141
141
|
task :chikan do
|
142
142
|
on roles(:web) do
|
143
|
-
puts 'Replacing localhost:8000 and Production URLs with Staging URLs...'
|
143
|
+
puts 'Replacing localhost:8000 / localhost:8001 and Production URLs with Staging URLs...'
|
144
144
|
|
145
145
|
# Set an anchor to first homogonize instances of URL's, then replace all the anchors
|
146
146
|
anchor = "URL_REPLACEMENT_ANCHOR_00000"
|
@@ -167,6 +167,8 @@ namespace :deploy do
|
|
167
167
|
# Set localhost entries to the anchor
|
168
168
|
db_data = db_data.gsub(/localhost\%3A8000/, anchor)
|
169
169
|
db_data = db_data.gsub(/localhost:8000/, anchor)
|
170
|
+
db_data = db_data.gsub(/localhost\%3A8001/, anchor)
|
171
|
+
db_data = db_data.gsub(/localhost:8001/, anchor)
|
170
172
|
|
171
173
|
# Replace anchors with the correct target URL
|
172
174
|
db_data = db_data.gsub(anchor, "#{opts['deployer']['fqdn']['staging']}")
|
@@ -1,27 +1,47 @@
|
|
1
|
-
FROM ubuntu:
|
1
|
+
FROM ubuntu:22.04
|
2
2
|
|
3
3
|
RUN apt-get update && apt-get dist-upgrade -y
|
4
4
|
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
php7.4-json php7.4-imagick php7.4-xml php7.4-zip php7.4-iconv \
|
5
|
+
|
6
|
+
RUN apt-get install -y nginx php-fpm php-mysql \
|
7
|
+
php-mbstring php-curl php-dom \
|
8
|
+
php-imagick php-xml php-zip \
|
9
|
+
composer nodejs npm \
|
11
10
|
libpng-dev libjpeg-dev \
|
12
11
|
mariadb-client mariadb-common \
|
13
|
-
supervisor curl
|
12
|
+
supervisor curl less neovim emacs
|
14
13
|
RUN apt-get clean
|
15
|
-
|
14
|
+
|
16
15
|
RUN mkdir /db \
|
17
|
-
&& chmod 777 /db
|
16
|
+
&& chmod 777 /db
|
18
17
|
|
19
18
|
COPY nginx.vhost /etc/nginx/sites-enabled/default
|
20
19
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
21
|
-
|
20
|
+
|
21
|
+
# NOTE: When the PHP FPM version changes, you MUST change the
|
22
|
+
# version definition right below this comment, then you must
|
23
|
+
# rebuild the nweb image!
|
24
|
+
ARG PHP_FPM_VERSION=8.1
|
25
|
+
RUN mkdir -p /run/php
|
26
|
+
COPY php.ini /etc/php/$PHP_FPM_VERSION/fpm/php.ini
|
27
|
+
RUN ln -s /usr/sbin/php-fpm$PHP_FPM_VERSION /usr/sbin/php-fpm
|
28
|
+
RUN ln -s /run/php/php$PHP_FPM_VERSION-fpm.sock /run/php/php-fpm.sock
|
29
|
+
RUN ln -s /run/php/php$PHP_FPM_VERSION-fpm.pid /run/php/php-fpm.pid
|
30
|
+
|
31
|
+
RUN npm install yarn -g
|
32
|
+
|
33
|
+
# The lines below install wp-cli in the container. However, since
|
34
|
+
# wp-cli is run as root it causes various permission problems. In
|
35
|
+
# the future this may be re-added with some method of correcting
|
36
|
+
# permissions. Until then, please use wp-cli locally.
|
37
|
+
#RUN curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp
|
38
|
+
#RUN chmod +x /usr/local/bin/wp
|
39
|
+
#RUN mkdir /root/.wp-cli
|
40
|
+
#COPY wp-cli.yml /root/.wp-cli/config.yml
|
41
|
+
#RUN echo 'alias wp="wp --allow-root"' >> /root/.bashrc
|
22
42
|
|
23
43
|
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
|
24
|
-
|
44
|
+
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
25
45
|
|
26
46
|
EXPOSE 80
|
27
47
|
|