@fishawack/lab-env 2.0.0 → 2.1.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,17 @@
1
1
  ## Changelog
2
2
 
3
+ ### 2.1.0 (2022-05-27)
4
+ * [Change] Bumped core `0.0.21` to `0.1.0`
5
+
6
+ ### 2.0.2 (2022-04-26)
7
+ * [Change] Bumped core `0.0.20` to `0.0.21`
8
+ * [Bug] Lock eb-cli due to breaking change
9
+ * [Bug] Removed imagemagick from php containers as it's now included in base image
10
+ * [Misc] Updated core publish postversion command
11
+
12
+ ### 2.0.1 (2022-04-13)
13
+ * [Bug] Explicitly set platform to fix M1 chip issues
14
+
3
15
  ### 2.0.0 (2022-04-05)
4
16
  * [Feature] Craftcms now an option in `fw new` command
5
17
  * [Change] Wordpress repos now works differently and will flag unsupported unless they change their folder structure - see [migration guide](https://demo.fishawack.solutions/Lab/Doc/#lab-env-migrating-200)
@@ -132,13 +132,19 @@ RUN apt-get install -y locales
132
132
  # Install AWS Elastic Beanstalk cli
133
133
  RUN apt-get install -y zlib1g-dev libssl-dev libncurses-dev libffi-dev libsqlite3-dev libreadline-dev libbz2-dev
134
134
 
135
- RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
135
+ RUN git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git --depth 1 --branch v0.1.2
136
136
  RUN ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
137
137
  RUN rm -rf ./aws-elastic-beanstalk-cli-setup
138
138
 
139
139
  RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
140
140
  locale-gen
141
141
 
142
+ # Install AWS-CLI@2
143
+ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
144
+ RUN unzip awscliv2.zip
145
+ RUN ./aws/install
146
+ RUN rm -rf ./aws && rm -rf awscliv2.zip
147
+
142
148
  # Cleanup apt-get install folders
143
149
  RUN apt-get clean && \
144
150
  rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
File without changes
@@ -0,0 +1,4 @@
1
+ ## Changelog
2
+
3
+ ### 0.1.0 (2022-05-27)
4
+ * [Feature] Added aws-cli@2 to core container
@@ -1,6 +1,7 @@
1
1
  version: "3.8"
2
2
  services:
3
3
  core:
4
+ platform: linux/amd64
4
5
  image: fishawack/core:${VERSION:-1.0.0}
5
6
  init: true
6
7
  tty: true
package/core/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "core",
3
- "version": "0.0.20",
3
+ "version": "0.1.0",
4
4
  "description": "lab-env docker config for the @fishawack/core npm module",
5
5
  "scripts": {
6
- "postversion": "docker tag fishawack/core:$npm_package_version fishawack/core:latest && docker push fishawack/core:$npm_package_version fishawack/core:latest"
6
+ "postversion": "mv ./*/ ./$npm_package_version && docker build ./*/ -t fishawack/core:$npm_package_version -t fishawack/core:latest && docker push fishawack/core:$npm_package_version && docker push fishawack/core:latest && git add . && git commit -m 'Bumped core to $npm_package_version'"
7
7
  },
8
8
  "author": "Mike Mellor",
9
9
  "license": "ISC"
@@ -1,5 +1,6 @@
1
1
  services:
2
2
  mysql:
3
+ platform: linux/amd64
3
4
  image: mysql:5.7
4
5
  networks:
5
6
  - default
@@ -13,6 +14,7 @@ services:
13
14
  volumes:
14
15
  - mysql:/var/lib/mysql
15
16
  nginx:
17
+ platform: linux/amd64
16
18
  image: nginx:1.19
17
19
  networks:
18
20
  - default
@@ -22,10 +24,11 @@ services:
22
24
  ports:
23
25
  - "${PORT_WEB:-8000}:80"
24
26
  php:
27
+ platform: linux/amd64
25
28
  build:
26
29
  context: ./php/
27
30
  dockerfile: Dockerfile
28
- image: lab-env/craftcms/3/php:0.0.1
31
+ image: lab-env/craftcms/3/php:0.0.2
29
32
  init: true
30
33
  working_dir: /app
31
34
  networks:
@@ -33,6 +36,7 @@ services:
33
36
  volumes:
34
37
  - $CWD/:/app
35
38
  - ./php/custom.conf:/opt/bitnami/php/etc/custom.conf
39
+ - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
36
40
  - vendor:/app/vendor
37
41
  networks:
38
42
  default:
@@ -6,11 +6,8 @@ MAINTAINER Mike Mellor
6
6
  RUN apt-get update && \
7
7
  apt-get install -y mariadb-client
8
8
 
9
- # Install Imagemagick
10
- RUN apt-get install -y libmagickwand-dev --no-install-recommends
11
-
12
- # PHP Imagick ext
13
- RUN pecl install imagick && docker-php-ext-enable imagick
9
+ # Install ghostscript
10
+ RUN apt-get install -y ghostscript
14
11
 
15
12
  # Cleanup apt-get install folders
16
13
  RUN apt-get clean && \
@@ -0,0 +1,99 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE policymap [
3
+ <!ELEMENT policymap (policy)*>
4
+ <!ATTLIST policymap xmlns CDATA #FIXED ''>
5
+ <!ELEMENT policy EMPTY>
6
+ <!ATTLIST policy xmlns CDATA #FIXED '' domain NMTOKEN #REQUIRED
7
+ name NMTOKEN #IMPLIED pattern CDATA #IMPLIED rights NMTOKEN #IMPLIED
8
+ stealth NMTOKEN #IMPLIED value CDATA #IMPLIED>
9
+ ]>
10
+ <!--
11
+ Configure ImageMagick policies.
12
+
13
+ Domains include system, delegate, coder, filter, path, or resource.
14
+
15
+ Rights include none, read, write, execute and all. Use | to combine them,
16
+ for example: "read | write" to permit read from, or write to, a path.
17
+
18
+ Use a glob expression as a pattern.
19
+
20
+ Suppose we do not want users to process MPEG video images:
21
+
22
+ <policy domain="delegate" rights="none" pattern="mpeg:decode" />
23
+
24
+ Here we do not want users reading images from HTTP:
25
+
26
+ <policy domain="coder" rights="none" pattern="HTTP" />
27
+
28
+ The /repository file system is restricted to read only. We use a glob
29
+ expression to match all paths that start with /repository:
30
+
31
+ <policy domain="path" rights="read" pattern="/repository/*" />
32
+
33
+ Lets prevent users from executing any image filters:
34
+
35
+ <policy domain="filter" rights="none" pattern="*" />
36
+
37
+ Any large image is cached to disk rather than memory:
38
+
39
+ <policy domain="resource" name="area" value="1GP"/>
40
+
41
+ Use the default system font unless overwridden by the application:
42
+
43
+ <policy domain="system" name="font" value="/usr/share/fonts/favorite.ttf"/>
44
+
45
+ Define arguments for the memory, map, area, width, height and disk resources
46
+ with SI prefixes (.e.g 100MB). In addition, resource policies are maximums
47
+ for each instance of ImageMagick (e.g. policy memory limit 1GB, -limit 2GB
48
+ exceeds policy maximum so memory limit is 1GB).
49
+
50
+ Rules are processed in order. Here we want to restrict ImageMagick to only
51
+ read or write a small subset of proven web-safe image types:
52
+
53
+ <policy domain="delegate" rights="none" pattern="*" />
54
+ <policy domain="filter" rights="none" pattern="*" />
55
+ <policy domain="coder" rights="none" pattern="*" />
56
+ <policy domain="coder" rights="read|write" pattern="{GIF,JPEG,PNG,WEBP}" />
57
+ -->
58
+ <policymap>
59
+ <!-- <policy domain="resource" name="temporary-path" value="/tmp"/> -->
60
+ <policy domain="resource" name="memory" value="256MiB"/>
61
+ <policy domain="resource" name="map" value="512MiB"/>
62
+ <policy domain="resource" name="width" value="16KP"/>
63
+ <policy domain="resource" name="height" value="16KP"/>
64
+ <!-- <policy domain="resource" name="list-length" value="128"/> -->
65
+ <policy domain="resource" name="area" value="128MP"/>
66
+ <policy domain="resource" name="disk" value="1GiB"/>
67
+ <!-- <policy domain="resource" name="file" value="768"/> -->
68
+ <!-- <policy domain="resource" name="thread" value="4"/> -->
69
+ <!-- <policy domain="resource" name="throttle" value="0"/> -->
70
+ <!-- <policy domain="resource" name="time" value="3600"/> -->
71
+ <!-- <policy domain="coder" rights="none" pattern="MVG" /> -->
72
+ <!-- <policy domain="module" rights="none" pattern="{PS,PDF,XPS}" /> -->
73
+ <!-- <policy domain="path" rights="none" pattern="@*" /> -->
74
+ <!-- <policy domain="cache" name="memory-map" value="anonymous"/> -->
75
+ <!-- <policy domain="cache" name="synchronize" value="True"/> -->
76
+ <!-- <policy domain="cache" name="shared-secret" value="passphrase" stealth="true"/> -->
77
+ <!-- <policy domain="system" name="max-memory-request" value="256MiB"/> -->
78
+ <!-- <policy domain="system" name="shred" value="2"/> -->
79
+ <!-- <policy domain="system" name="precision" value="6"/> -->
80
+ <!-- <policy domain="system" name="font" value="/path/to/font.ttf"/> -->
81
+ <!-- <policy domain="system" name="pixel-cache-memory" value="anonymous"/> -->
82
+ <!-- <policy domain="system" name="shred" value="2"/> -->
83
+ <!-- <policy domain="system" name="precision" value="6"/> -->
84
+ <!-- not needed due to the need to use explicitly by mvg: -->
85
+ <!-- <policy domain="delegate" rights="none" pattern="MVG" /> -->
86
+ <!-- use curl -->
87
+ <policy domain="delegate" rights="none" pattern="URL" />
88
+ <policy domain="delegate" rights="none" pattern="HTTPS" />
89
+ <policy domain="delegate" rights="none" pattern="HTTP" />
90
+ <!-- in order to avoid to get image with password text -->
91
+ <policy domain="path" rights="none" pattern="@*"/>
92
+ <!-- disable ghostscript format types -->
93
+ <!-- <policy domain="coder" rights="none" pattern="PS" />
94
+ <policy domain="coder" rights="none" pattern="PS2" />
95
+ <policy domain="coder" rights="none" pattern="PS3" />
96
+ <policy domain="coder" rights="none" pattern="EPS" />
97
+ <policy domain="coder" rights="none" pattern="PDF" />
98
+ <policy domain="coder" rights="none" pattern="XPS" /> -->
99
+ </policymap>
@@ -1,5 +1,6 @@
1
1
  services:
2
2
  mysql:
3
+ platform: linux/amd64
3
4
  image: mysql:8.0.23
4
5
  networks:
5
6
  - default
@@ -16,6 +17,7 @@ services:
16
17
  - seccomp:unconfined
17
18
  command: --default-authentication-plugin=mysql_native_password
18
19
  apache:
20
+ platform: linux/amd64
19
21
  image: bitnami/apache:2.4.51
20
22
  networks:
21
23
  - default
@@ -30,10 +32,11 @@ services:
30
32
  ports:
31
33
  - "${PORT_WEB:-8000}:8080"
32
34
  php:
35
+ platform: linux/amd64
33
36
  build:
34
37
  context: ./php/
35
38
  dockerfile: Dockerfile
36
- image: lab-env/drupal/9/php:0.0.2
39
+ image: lab-env/drupal/9/php:0.0.3
37
40
  init: true
38
41
  working_dir: /app
39
42
  networks:
@@ -51,6 +54,7 @@ services:
51
54
  - vendor:/app/vendor
52
55
  - drupal:/app/web
53
56
  core:
57
+ platform: linux/amd64
54
58
  volumes:
55
59
  - drupal:/app/web
56
60
 
@@ -6,12 +6,6 @@ MAINTAINER Mike Mellor
6
6
  RUN apt-get update && \
7
7
  apt-get install -y mariadb-client
8
8
 
9
- # Install Imagemagick
10
- RUN apt-get install -y libmagickwand-dev --no-install-recommends
11
-
12
- # PHP Imagick ext
13
- RUN pecl install imagick && docker-php-ext-enable imagick
14
-
15
9
  # Install ghostscript
16
10
  RUN apt-get install -y ghostscript
17
11
 
@@ -1,5 +1,6 @@
1
1
  services:
2
2
  mysql:
3
+ platform: linux/amd64
3
4
  image: mysql:5.7
4
5
  networks:
5
6
  - default
@@ -13,6 +14,7 @@ services:
13
14
  volumes:
14
15
  - mysql:/var/lib/mysql
15
16
  nginx:
17
+ platform: linux/amd64
16
18
  image: nginx:1.19
17
19
  networks:
18
20
  - default
@@ -22,10 +24,11 @@ services:
22
24
  ports:
23
25
  - "${PORT_WEB:-8000}:80"
24
26
  php:
27
+ platform: linux/amd64
25
28
  build:
26
29
  context: ./php/
27
30
  dockerfile: Dockerfile
28
- image: lab-env/laravel/8/php:0.0.1
31
+ image: lab-env/laravel/8/php:0.0.2
29
32
  init: true
30
33
  working_dir: /app
31
34
  networks:
@@ -36,6 +39,7 @@ services:
36
39
  - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
37
40
  - vendor:/app/vendor
38
41
  redis:
42
+ platform: linux/amd64
39
43
  image: redis:alpine
40
44
  networks:
41
45
  - default
@@ -2,15 +2,9 @@ FROM chialab/php:7.4-fpm
2
2
 
3
3
  MAINTAINER Mike Mellor
4
4
 
5
- # Install Imagemagick
6
- RUN apt-get update && \
7
- apt-get install -y libmagickwand-dev --no-install-recommends
8
-
9
- # PHP Imagick ext
10
- RUN pecl install imagick && docker-php-ext-enable imagick
11
-
12
5
  # Install ghostscript
13
- RUN apt-get install -y ghostscript
6
+ RUN apt-get update && \
7
+ apt-get install -y ghostscript
14
8
 
15
9
  # Cleanup apt-get install folders
16
10
  RUN apt-get clean && \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  services:
2
2
  mysql:
3
+ platform: linux/amd64
3
4
  image: mysql:5.7
4
5
  networks:
5
6
  - default
@@ -13,6 +14,7 @@ services:
13
14
  volumes:
14
15
  - mysql:/var/lib/mysql
15
16
  wordpress:
17
+ platform: linux/amd64
16
18
  build:
17
19
  context: ./wordpress/
18
20
  dockerfile: Dockerfile