@fishawack/lab-env 4.22.0 → 4.24.0
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.
- package/CHANGELOG.md +17 -0
- package/commands/create/services/aws/index.js +1 -1
- package/commands/create/templates/elasticbeanstalk/.ebextensions/wordpress/post-deploy.config +6 -2
- package/core/1/docker-compose.yml +6 -3
- package/craftcms/3/php/CHANGELOG.md +3 -0
- package/craftcms/3/php/Dockerfile +3 -0
- package/craftcms/3/php/package.json +1 -1
- package/drupal/9/php/CHANGELOG.md +3 -0
- package/drupal/9/php/Dockerfile +3 -0
- package/drupal/9/php/package.json +1 -1
- package/globals.js +26 -16
- package/laravel/9/php/CHANGELOG.md +3 -0
- package/laravel/9/php/Dockerfile +3 -0
- package/laravel/9/php/package.json +1 -1
- package/package.json +1 -1
- package/wordpress/1/php/CHANGELOG.md +3 -0
- package/wordpress/1/php/Dockerfile +3 -0
- package/wordpress/1/php/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
## Changelog
|
|
2
2
|
|
|
3
|
+
### 4.23.0 (2023-10-24)
|
|
4
|
+
* [Feature] add target and target_image args to dockerfile build process to overrides can switch between full and alpine
|
|
5
|
+
* [Feature] added new clients
|
|
6
|
+
* [Feature] automatically override docker context and image name if core found in correct folder structure
|
|
7
|
+
* [Feature] can now override target and image env variables
|
|
8
|
+
* [Feature] can now specify docker context as env variable
|
|
9
|
+
|
|
10
|
+
### 4.22.1 (2023-08-14)
|
|
11
|
+
* [Change] Bumped fishawack/lab-env-craftcms-3-php to 1.0.1
|
|
12
|
+
* [Change] Bumped fishawack/lab-env-drupal-9-php to 0.6.1
|
|
13
|
+
* [Change] Bumped fishawack/lab-env-laravel-9-php to 1.0.2
|
|
14
|
+
* [Change] Bumped fishawack/lab-env-wordpress-1-php to 1.1.1
|
|
15
|
+
* [Bug] move composer home directory so cache folder is writeable
|
|
16
|
+
* [Bug] move composer home directory so cache folder is writeable
|
|
17
|
+
* [Bug] move composer home directory so cache folder is writeable
|
|
18
|
+
* [Bug] move composer home directory so cache folder is writeable
|
|
19
|
+
|
|
3
20
|
### 4.22.0 (2023-08-09)
|
|
4
21
|
* [Feature] Added newly setup AWS accounts to the client prompts on @fishawack/core and @fishawack/lab-env have mismatching versions.
|
|
5
22
|
* [Feature] added drupal configs
|
|
@@ -6,7 +6,7 @@ module.exports.iam = require("./iam.js");
|
|
|
6
6
|
|
|
7
7
|
module.exports.slug = (repo, client, branch) => s3Safe(`${branch}-${repo}-${client}`);
|
|
8
8
|
|
|
9
|
-
module.exports.clients = ['fishawack', 'abbvie', 'sanofigenzyme', 'gsk', 'janssen', 'astrazeneca', 'ptc', 'jazz', 'pfizer', 'heron', 'novartis', 'training', 'merck', 'acadia', 'travere', 'roche', 'utc', 'bayer', 'alcon', 'uhc', 'chiesi', '3m', 'sarepta', 'ipsen', 'novocure', 'anthem', 'kyowakirin', 'optum', 'rally', 'menarini', 'childrensminnesota', 'gore'];
|
|
9
|
+
module.exports.clients = ['fishawack', 'abbvie', 'sanofigenzyme', 'gsk', 'janssen', 'astrazeneca', 'ptc', 'jazz', 'pfizer', 'heron', 'novartis', 'training', 'merck', 'acadia', 'travere', 'roche', 'utc', 'bayer', 'alcon', 'uhc', 'chiesi', '3m', 'sarepta', 'ipsen', 'novocure', 'anthem', 'kyowakirin', 'optum', 'rally', 'menarini', 'childrensminnesota', 'gore', 'axogen', 'gedeonrichter'];
|
|
10
10
|
|
|
11
11
|
module.exports.static = async (name, account, tags = [], credentials = []) => {
|
|
12
12
|
let s3 = await module.exports.s3.createS3Bucket(name, account, tags);
|
package/commands/create/templates/elasticbeanstalk/.ebextensions/wordpress/post-deploy.config
CHANGED
|
@@ -4,7 +4,11 @@ container_commands:
|
|
|
4
4
|
leader_only: true
|
|
5
5
|
20-db-remove:
|
|
6
6
|
command: "rm -rf auto-ci-db.sql"
|
|
7
|
-
30-
|
|
7
|
+
30-cleanup-plugins:
|
|
8
|
+
command: "wp option update active_plugins {} --format=json"
|
|
9
|
+
40-activate-plugins:
|
|
10
|
+
command: "wp plugin activate --all"
|
|
11
|
+
50-rewrite-flush:
|
|
8
12
|
command: "vendor/bin/wp rewrite flush --hard"
|
|
9
|
-
|
|
13
|
+
60-rewrite-flush:
|
|
10
14
|
command: "vendor/bin/wp cli cache clear"
|
|
@@ -2,11 +2,14 @@ version: "3.8"
|
|
|
2
2
|
services:
|
|
3
3
|
core:
|
|
4
4
|
build:
|
|
5
|
-
context: $
|
|
6
|
-
target: $
|
|
5
|
+
context: $FW_CORE_1_CONTEXT
|
|
6
|
+
target: $FW_CORE_1_TARGET
|
|
7
7
|
ssh:
|
|
8
8
|
- default
|
|
9
|
-
|
|
9
|
+
args:
|
|
10
|
+
target: $FW_CORE_1_TARGET
|
|
11
|
+
target_image: $FW_CORE_1_TARGET_IMAGE
|
|
12
|
+
image: $FW_CORE_1_IMAGE:${FW_CORE_1_VERSION:-latest}
|
|
10
13
|
init: true
|
|
11
14
|
tty: true
|
|
12
15
|
volumes:
|
|
@@ -18,6 +18,9 @@ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
18
18
|
# Add php user
|
|
19
19
|
RUN useradd -m -G www-data -s /bin/bash php
|
|
20
20
|
|
|
21
|
+
# Change composer home dir
|
|
22
|
+
ENV COMPOSER_HOME=/home/php/.composer
|
|
23
|
+
|
|
21
24
|
# Cleanup apt-get install folders
|
|
22
25
|
RUN apt-get clean && \
|
|
23
26
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
package/drupal/9/php/Dockerfile
CHANGED
|
@@ -18,6 +18,9 @@ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
18
18
|
# Add php user
|
|
19
19
|
RUN useradd -m -G www-data -s /bin/bash php
|
|
20
20
|
|
|
21
|
+
# Change composer home dir
|
|
22
|
+
ENV COMPOSER_HOME=/home/php/.composer
|
|
23
|
+
|
|
21
24
|
# Cleanup apt-get install folders
|
|
22
25
|
RUN apt-get clean && \
|
|
23
26
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
package/globals.js
CHANGED
|
@@ -12,6 +12,8 @@ process.env.DIRNAME = __dirname;
|
|
|
12
12
|
process.env.USER_UID=execSync("id -u", {encoding: 'utf8', stdio: 'pipe'}).trim();
|
|
13
13
|
process.env.USER_GID=execSync("id -g", {encoding: 'utf8', stdio: 'pipe'}).trim();
|
|
14
14
|
|
|
15
|
+
const cwd = process.cwd();
|
|
16
|
+
|
|
15
17
|
const isDirectory = source => lstatSync(source).isDirectory();
|
|
16
18
|
const getDirectories = source => readdirSync(source).map(name => path.join(source, name)).filter(isDirectory);
|
|
17
19
|
|
|
@@ -45,18 +47,18 @@ try{
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
try{
|
|
48
|
-
repo = execSync('basename "$(git rev-parse --show-toplevel)"', {encoding: 'utf8', stdio: 'pipe'}).trim() || path.basename(
|
|
50
|
+
repo = execSync('basename "$(git rev-parse --show-toplevel)"', {encoding: 'utf8', stdio: 'pipe'}).trim() || path.basename(cwd);
|
|
49
51
|
} catch(e){
|
|
50
|
-
repo = path.basename(
|
|
52
|
+
repo = path.basename(cwd);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
const repo_safe = repo.replace(/\./g, '');
|
|
54
56
|
|
|
55
|
-
try{ pkg = require(path.join(
|
|
57
|
+
try{ pkg = require(path.join(cwd, 'package.json')); } catch(e){}
|
|
56
58
|
|
|
57
|
-
try{ composer = require(path.join(
|
|
59
|
+
try{ composer = require(path.join(cwd, 'composer.json')); } catch(e){}
|
|
58
60
|
|
|
59
|
-
try{ wordpress = existsSync(path.join(
|
|
61
|
+
try{ wordpress = existsSync(path.join(cwd, 'wp-content/')); } catch(e){}
|
|
60
62
|
|
|
61
63
|
if(composer && composer.require && composer.require['laravel/framework']){
|
|
62
64
|
platform = 'laravel';
|
|
@@ -109,7 +111,7 @@ if(composer && composer.require && composer.require['laravel/framework']){
|
|
|
109
111
|
} else {
|
|
110
112
|
// Check for old wordpress repo stucture and show warning
|
|
111
113
|
try{
|
|
112
|
-
if(existsSync(path.join(
|
|
114
|
+
if(existsSync(path.join(cwd, 'themes/'))){
|
|
113
115
|
console.log(`This wordpress repo needs migrating to the new repo structure: \n${utilities.colorize(`https://demo.fishawack.solutions/Lab/Doc/#lab-env-migrating-200`, 'title')}`)
|
|
114
116
|
process.exit(1);
|
|
115
117
|
}
|
|
@@ -140,10 +142,9 @@ if(process.env.FW_NEXT){
|
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
// Map full image or alpine
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
145
|
+
process.env.FW_CORE_1_TARGET_IMAGE = process.env.FW_CORE_1_TARGET_IMAGE || (process.env.FW_FULL ? "" : "-alpine");
|
|
146
|
+
process.env.FW_CORE_1_TARGET = process.env.FW_CORE_1_TARGET || (process.env.FW_FULL ? "full" : "alpine");
|
|
147
|
+
process.env.FW_CORE_1_IMAGE = process.env.FW_CORE_1_IMAGE || `fishawack/lab-env-core-1${process.env.FW_CORE_1_TARGET_IMAGE}`;
|
|
147
148
|
|
|
148
149
|
var core = `-f ${__dirname}/core/${process.env.VERSION}/docker-compose.yml`;
|
|
149
150
|
|
|
@@ -161,22 +162,31 @@ process.env.FW_WORDPRESS_0_VERSION = process.env.FW_WORDPRESS_0_VERSION || requi
|
|
|
161
162
|
process.env.FW_WORDPRESS_1_PHP_VERSION = process.env.FW_WORDPRESS_1_PHP_VERSION || require('./wordpress/1/php/package.json').version;
|
|
162
163
|
process.env.FW_WORDPRESS_1_APACHE_VERSION = process.env.FW_WORDPRESS_1_APACHE_VERSION || require('./wordpress/1/apache/package.json').version;
|
|
163
164
|
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
// Map docker contexts
|
|
166
|
+
process.env.FW_CORE_1_CONTEXT = process.env.FW_CORE_1_CONTEXT || `${__dirname}/core/1/`;
|
|
167
|
+
|
|
168
|
+
let contextOverride = path.join(cwd, '_Docker/core/1/');
|
|
169
|
+
if(existsSync(path.join(contextOverride, 'Dockerfile'))){
|
|
170
|
+
process.env.FW_CORE_1_CONTEXT = contextOverride;
|
|
171
|
+
process.env.FW_CORE_1_IMAGE += `-${repo_safe}`;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if(existsSync(path.join(cwd, '.env.example')) && !existsSync(path.join(cwd, '.env'))){
|
|
175
|
+
copyFileSync(path.join(cwd, '.env.example'), path.join(cwd, '.env'));
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
if(platform === 'laravel'){
|
|
169
179
|
let container = `-f ${__dirname}/laravel/${process.env.VERSION_LARAVEL}/docker-compose.yml`;
|
|
170
180
|
|
|
171
|
-
docker = `docker compose --env-file ${path.join(
|
|
181
|
+
docker = `docker compose --env-file ${path.join(cwd, '.env')} ${container} ${core} -p ${repo_safe}`;
|
|
172
182
|
} else if(platform === 'wordpress'){
|
|
173
|
-
docker = `docker compose --env-file ${path.join(
|
|
183
|
+
docker = `docker compose --env-file ${path.join(cwd, '.env')} -f ${__dirname}/wordpress/${process.env.VERSION_WORDPRESS}/docker-compose.yml ${core} -p ${repo_safe}`;
|
|
174
184
|
} else if(platform === "drupal"){
|
|
175
185
|
let container = `-f ${__dirname}/drupal/9/docker-compose.yml`;
|
|
176
186
|
|
|
177
|
-
docker = `docker compose --env-file ${path.join(
|
|
187
|
+
docker = `docker compose --env-file ${path.join(cwd, '.env')} ${container} ${core} -p ${repo_safe}`;
|
|
178
188
|
} else if(platform === "craftcms"){
|
|
179
|
-
docker = `docker compose --env-file ${path.join(
|
|
189
|
+
docker = `docker compose --env-file ${path.join(cwd, '.env')} -f ${__dirname}/craftcms/3/docker-compose.yml ${core} -p ${repo_safe}`;
|
|
180
190
|
} else {
|
|
181
191
|
docker = `docker compose ${core} -p ${repo_safe}`;
|
|
182
192
|
}
|
package/laravel/9/php/Dockerfile
CHANGED
|
@@ -15,6 +15,9 @@ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
15
15
|
# Add php user
|
|
16
16
|
RUN useradd -m -G www-data -s /bin/bash php
|
|
17
17
|
|
|
18
|
+
# Change composer home dir
|
|
19
|
+
ENV COMPOSER_HOME=/home/php/.composer
|
|
20
|
+
|
|
18
21
|
# Cleanup apt-get install folders
|
|
19
22
|
RUN apt-get clean && \
|
|
20
23
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
package/package.json
CHANGED
|
@@ -18,6 +18,9 @@ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
|
|
|
18
18
|
# Add php user
|
|
19
19
|
RUN useradd -m -G www-data -s /bin/bash php
|
|
20
20
|
|
|
21
|
+
# Change composer home dir
|
|
22
|
+
ENV COMPOSER_HOME=/home/php/.composer
|
|
23
|
+
|
|
21
24
|
# Cleanup apt-get install folders
|
|
22
25
|
RUN apt-get clean && \
|
|
23
26
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|