@fishawack/lab-env 4.19.0 → 4.21.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.21.0 (2023-05-22)
4
+ * [Feature] added elastic beanstalk config stubs
5
+ * [Change] wp command now prepends vendor path in wordpress@1 and no longer passes path as its found in wp-cli yml
6
+ * [Change] Bumped fishawack/lab-env-wordpress-1-php to 1.1.0
7
+
8
+ ### 4.20.0 (2023-05-19)
9
+ * [Feature] added new clients
10
+
3
11
  ### 4.19.0 (2023-05-17)
4
12
  * [Feature] Added newly setup AWS accounts to the client prompts on `fw provision`
5
13
 
@@ -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'];
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'];
10
10
 
11
11
  module.exports.static = async (name, account, tags = [], credentials = []) => {
12
12
  let s3 = await module.exports.s3.createS3Bucket(name, account, tags);
@@ -0,0 +1,24 @@
1
+ files:
2
+ /etc/cron.d/certbot_renew:
3
+ content: "@weekly root certbot renew\n"
4
+ group: root
5
+ mode: "000644"
6
+ owner: root
7
+
8
+ container_commands:
9
+ 10_downloadepel:
10
+ command: "wget -r --no-parent -A 'epel-release-*.rpm' https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/"
11
+ 20_installepel:
12
+ command: "rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-*.rpm --force"
13
+ 30_enableepl:
14
+ command: "yum-config-manager --enable epel*"
15
+ 40_installcertbot:
16
+ command: "yum install -y certbot"
17
+ 50_getcert:
18
+ command: "certbot certonly --debug --non-interactive --email ${EMAIL_LINK} --agree-tos --standalone --expand --domains ${DOMAIN_LINK} --keep-until-expiring --pre-hook \"service httpd stop\""
19
+ 60_link:
20
+ command: "ln -sf /etc/letsencrypt/live/$(echo ${DOMAIN_LINK} | cut -d, -f1) /etc/letsencrypt/live/ebcert"
21
+ 70_startserver:
22
+ command: "service httpd start"
23
+ 80_cleanup:
24
+ command: "rm -rf dl.fedoraproject.org"
@@ -0,0 +1,40 @@
1
+ ###################################################################################################
2
+ #### Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ ####
4
+ #### Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file
5
+ #### except in compliance with the License. A copy of the License is located at
6
+ ####
7
+ #### http://aws.amazon.com/apache2.0/
8
+ ####
9
+ #### or in the "license" file accompanying this file. This file is distributed on an "AS IS"
10
+ #### BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11
+ #### License for the specific language governing permissions and limitations under the License.
12
+ ###################################################################################################
13
+
14
+ ###################################################################################################
15
+ #### This configuration file modifies the default port 80 listener attached to an Application Load Balancer
16
+ #### to automatically redirect incoming connections on HTTP to HTTPS.
17
+ #### This will not work with an environment using the load balancer type Classic or Network.
18
+ #### A prerequisite is that the 443 listener has already been created.
19
+ #### Please use the below link for more information about creating an Application Load Balancer on
20
+ #### the Elastic Beanstalk console.
21
+ #### https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-alb.html#environments-cfg-alb-console
22
+ ###################################################################################################
23
+
24
+ Resources:
25
+ AWSEBV2LoadBalancerListener:
26
+ Type: AWS::ElasticLoadBalancingV2::Listener
27
+ Properties:
28
+ LoadBalancerArn:
29
+ Ref: AWSEBV2LoadBalancer
30
+ Port: 80
31
+ Protocol: HTTP
32
+ DefaultActions:
33
+ - Type: redirect
34
+ RedirectConfig:
35
+ Host: "#{host}"
36
+ Path: "/#{path}"
37
+ Port: "443"
38
+ Protocol: "HTTPS"
39
+ Query: "#{query}"
40
+ StatusCode: "HTTP_301"
@@ -0,0 +1,13 @@
1
+ Resources:
2
+ sslSecurityGroupIngress:
3
+ Properties:
4
+ CidrIp: 0.0.0.0/0
5
+ FromPort: 443
6
+ GroupId:
7
+ ? "Fn::GetAtt"
8
+ :
9
+ - AWSEBSecurityGroup
10
+ - GroupId
11
+ IpProtocol: tcp
12
+ ToPort: 443
13
+ Type: "AWS::EC2::SecurityGroupIngress"
@@ -0,0 +1,6 @@
1
+ commands:
2
+ setvars:
3
+ command: /opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "export \(.key)=\"\(.value)\""' > /etc/profile.d/sh.local
4
+ packages:
5
+ yum:
6
+ jq: []
@@ -0,0 +1,10 @@
1
+ files:
2
+ "/etc/php.d/custom.ini":
3
+ mode: "000755"
4
+ owner: root
5
+ group: root
6
+ content: |
7
+ memory_limit = 500M
8
+ upload_max_filesize = 500M
9
+ post_max_size = 500M
10
+ max_execution_time = 600
@@ -0,0 +1,3 @@
1
+ option_settings:
2
+ - option_name: WP_CLI_ALLOW_ROOT
3
+ value: true
@@ -0,0 +1,10 @@
1
+ container_commands:
2
+ 10-db-import:
3
+ command: if [ -f auto-ci-db.sql ]; then vendor/bin/wp db reset --yes; vendor/bin/wp db import auto-ci-db.sql; fi
4
+ leader_only: true
5
+ 20-db-remove:
6
+ command: "rm -rf auto-ci-db.sql"
7
+ 30-rewrite-flush:
8
+ command: "vendor/bin/wp rewrite flush --hard"
9
+ 40-rewrite-flush:
10
+ command: "vendor/bin/wp cli cache clear"
@@ -0,0 +1,5 @@
1
+ option_settings:
2
+ aws:elasticbeanstalk:container:php:phpini:
3
+ document_root: /wordpress
4
+ aws:elasticbeanstalk:environment:proxy:
5
+ ProxyServer: apache
@@ -0,0 +1,5 @@
1
+ <VirtualHost *:80>
2
+ RewriteEngine On
3
+ RewriteCond %{HTTPS} off
4
+ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
5
+ </VirtualHost>
@@ -0,0 +1,10 @@
1
+ Listen 443
2
+
3
+ <VirtualHost *:443>
4
+ DocumentRoot /var/www/html/wordpress
5
+
6
+ SSLEngine on
7
+ SSLCertificateFile /etc/letsencrypt/live/ebcert/fullchain.pem
8
+ SSLCertificateKeyFile /etc/letsencrypt/live/ebcert/privkey.pem
9
+ SSLCertificateChainFile /etc/letsencrypt/live/ebcert/chain.pem
10
+ </VirtualHost>
package/commands/wp.js CHANGED
@@ -12,9 +12,9 @@ module.exports = [
12
12
  });
13
13
  },
14
14
  argv => _.up(() => {
15
- const path = process.env.VERSION_WORDPRESS !== "0" ? '--path=./wordpress' : '';
16
15
  const container = process.env.VERSION_WORDPRESS !== "0" ? 'php' : 'wordpress';
16
+ const path = process.env.VERSION_WORDPRESS !== "0" ? 'vendor/bin/' : '';
17
17
 
18
- _.command(container, `wp ${path} ${argv.command.join(' ')} --allow-root`);
18
+ _.command(container, `${path}wp ${argv.command.join(' ')} --allow-root`);
19
19
  })
20
20
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.19.0",
3
+ "version": "4.21.0",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {
@@ -1,4 +1,7 @@
1
1
  ## Changelog
2
2
 
3
+ ### 1.1.0 (2023-05-22)
4
+ * [Change] no longer install wp in image but through composer
5
+
3
6
  ### 1.0.0 (2023-03-22)
4
7
  * [Misc] initial commit
@@ -18,11 +18,6 @@ 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
- # Install wordpress cli
22
- RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && \
23
- chmod +x wp-cli.phar && \
24
- mv wp-cli.phar /usr/local/bin/wp
25
-
26
21
  # Cleanup apt-get install folders
27
22
  RUN apt-get clean && \
28
23
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "php",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "lab-env docker config for the php module",
5
5
  "scripts": {
6
6
  "preversion": "docker login",