@fishawack/lab-env 4.5.0 → 4.7.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,14 @@
1
1
  ## Changelog
2
2
 
3
+ ### 4.7.0 (2022-12-20)
4
+ * [Feature] --debug flag that shows extra information about running commands
5
+ * [Feature] Added newly setup AWS accounts to the client prompts on `fw provision`
6
+
7
+ ### 4.6.0 (2022-11-30)
8
+ * [Bug] Drupal now uses httpd so that htaccess files are respected
9
+ * [Bug] No longer mount env file into drupal php env container as env variables
10
+ * [Bug] Drupal now has wordpress upload limits of 500M
11
+
3
12
  ### 4.5.0 (2022-11-21)
4
13
  * [Feature] Preset choice on `fw diagnose` now gives commands suitable to option chosen
5
14
  * [Feature] Added preset option of external to `fw diagnose` prompt
package/cli.js CHANGED
@@ -25,6 +25,10 @@ const args = hideBin(process.argv);
25
25
  .scriptName("fw")
26
26
  .parserConfiguration({
27
27
  'unknown-options-as-args': true
28
+ })
29
+ .option('debug', {
30
+ global: true,
31
+ description: `Show extra information to help debug issues`
28
32
  });
29
33
 
30
34
  // Repo commands
@@ -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'];
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'];
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,11 @@
1
+ FROM httpd:2.4.54 AS development
2
+
3
+ MAINTAINER Mike Mellor
4
+
5
+ # Copy nginx conf
6
+ COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf
7
+
8
+ FROM fishawack/lab-env-drupal-9-apache:latest AS production
9
+
10
+ # Copy source code into container
11
+ COPY . /app
@@ -0,0 +1,554 @@
1
+ Mutex posixsem
2
+ #
3
+ # This is the main Apache HTTP server configuration file. It contains the
4
+ # configuration directives that give the server its instructions.
5
+ # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
6
+ # In particular, see
7
+ # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
8
+ # for a discussion of each configuration directive.
9
+ #
10
+ # Do NOT simply read the instructions in here without understanding
11
+ # what they do. They're here only as hints or reminders. If you are unsure
12
+ # consult the online docs. You have been warned.
13
+ #
14
+ # Configuration and logfile names: If the filenames you specify for many
15
+ # of the server's control files begin with "/" (or "drive:/" for Win32), the
16
+ # server will use that explicit path. If the filenames do *not* begin
17
+ # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
18
+ # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
19
+ # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
20
+ # will be interpreted as '/logs/access_log'.
21
+
22
+ #
23
+ # ServerRoot: The top of the directory tree under which the server's
24
+ # configuration, error, and log files are kept.
25
+ #
26
+ # Do not add a slash at the end of the directory path. If you point
27
+ # ServerRoot at a non-local disk, be sure to specify a local disk on the
28
+ # Mutex directive, if file-based mutexes are used. If you wish to share the
29
+ # same ServerRoot for multiple httpd daemons, you will need to change at
30
+ # least PidFile.
31
+ #
32
+ ServerRoot "/usr/local/apache2"
33
+
34
+ #
35
+ # Mutex: Allows you to set the mutex mechanism and mutex file directory
36
+ # for individual mutexes, or change the global defaults
37
+ #
38
+ # Uncomment and change the directory if mutexes are file-based and the default
39
+ # mutex file directory is not on a local disk or is not appropriate for some
40
+ # other reason.
41
+ #
42
+ # Mutex default:logs
43
+
44
+ #
45
+ # Listen: Allows you to bind Apache to specific IP addresses and/or
46
+ # ports, instead of the default. See also the <VirtualHost>
47
+ # directive.
48
+ #
49
+ # Change this to Listen on specific IP addresses as shown below to
50
+ # prevent Apache from glomming onto all bound IP addresses.
51
+ #
52
+ #Listen 12.34.56.78:80
53
+ Listen 8080
54
+
55
+ #
56
+ # Dynamic Shared Object (DSO) Support
57
+ #
58
+ # To be able to use the functionality of a module which was built as a DSO you
59
+ # have to place corresponding `LoadModule' lines at this location so the
60
+ # directives contained in it are actually available _before_ they are used.
61
+ # Statically compiled modules (those listed by `httpd -l') do not need
62
+ # to be loaded here.
63
+ #
64
+ # Example:
65
+ # LoadModule foo_module modules/mod_foo.so
66
+ #
67
+ LoadModule mpm_event_module modules/mod_mpm_event.so
68
+ #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
69
+ #LoadModule mpm_worker_module modules/mod_mpm_worker.so
70
+ LoadModule authn_file_module modules/mod_authn_file.so
71
+ #LoadModule authn_dbm_module modules/mod_authn_dbm.so
72
+ #LoadModule authn_anon_module modules/mod_authn_anon.so
73
+ #LoadModule authn_dbd_module modules/mod_authn_dbd.so
74
+ #LoadModule authn_socache_module modules/mod_authn_socache.so
75
+ LoadModule authn_core_module modules/mod_authn_core.so
76
+ LoadModule authz_host_module modules/mod_authz_host.so
77
+ LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
78
+ LoadModule authz_user_module modules/mod_authz_user.so
79
+ #LoadModule authz_dbm_module modules/mod_authz_dbm.so
80
+ #LoadModule authz_owner_module modules/mod_authz_owner.so
81
+ #LoadModule authz_dbd_module modules/mod_authz_dbd.so
82
+ LoadModule authz_core_module modules/mod_authz_core.so
83
+ #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
84
+ #LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
85
+ LoadModule access_compat_module modules/mod_access_compat.so
86
+ LoadModule auth_basic_module modules/mod_auth_basic.so
87
+ #LoadModule auth_form_module modules/mod_auth_form.so
88
+ #LoadModule auth_digest_module modules/mod_auth_digest.so
89
+ #LoadModule allowmethods_module modules/mod_allowmethods.so
90
+ #LoadModule isapi_module modules/mod_isapi.so
91
+ #LoadModule file_cache_module modules/mod_file_cache.so
92
+ LoadModule cache_module modules/mod_cache.so
93
+ #LoadModule cache_disk_module modules/mod_cache_disk.so
94
+ #LoadModule cache_socache_module modules/mod_cache_socache.so
95
+ #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
96
+ #LoadModule socache_dbm_module modules/mod_socache_dbm.so
97
+ #LoadModule socache_memcache_module modules/mod_socache_memcache.so
98
+ #LoadModule socache_redis_module modules/mod_socache_redis.so
99
+ #LoadModule watchdog_module modules/mod_watchdog.so
100
+ #LoadModule macro_module modules/mod_macro.so
101
+ #LoadModule dbd_module modules/mod_dbd.so
102
+ #LoadModule bucketeer_module modules/mod_bucketeer.so
103
+ #LoadModule dumpio_module modules/mod_dumpio.so
104
+ #LoadModule echo_module modules/mod_echo.so
105
+ #LoadModule example_hooks_module modules/mod_example_hooks.so
106
+ #LoadModule case_filter_module modules/mod_case_filter.so
107
+ #LoadModule case_filter_in_module modules/mod_case_filter_in.so
108
+ #LoadModule example_ipc_module modules/mod_example_ipc.so
109
+ #LoadModule buffer_module modules/mod_buffer.so
110
+ #LoadModule data_module modules/mod_data.so
111
+ #LoadModule ratelimit_module modules/mod_ratelimit.so
112
+ LoadModule reqtimeout_module modules/mod_reqtimeout.so
113
+ #LoadModule ext_filter_module modules/mod_ext_filter.so
114
+ #LoadModule request_module modules/mod_request.so
115
+ #LoadModule include_module modules/mod_include.so
116
+ LoadModule filter_module modules/mod_filter.so
117
+ #LoadModule reflector_module modules/mod_reflector.so
118
+ #LoadModule substitute_module modules/mod_substitute.so
119
+ #LoadModule sed_module modules/mod_sed.so
120
+ #LoadModule charset_lite_module modules/mod_charset_lite.so
121
+ LoadModule deflate_module modules/mod_deflate.so
122
+ #LoadModule xml2enc_module modules/mod_xml2enc.so
123
+ #LoadModule proxy_html_module modules/mod_proxy_html.so
124
+ #LoadModule brotli_module modules/mod_brotli.so
125
+ LoadModule mime_module modules/mod_mime.so
126
+ #LoadModule ldap_module modules/mod_ldap.so
127
+ LoadModule log_config_module modules/mod_log_config.so
128
+ #LoadModule log_debug_module modules/mod_log_debug.so
129
+ #LoadModule log_forensic_module modules/mod_log_forensic.so
130
+ #LoadModule logio_module modules/mod_logio.so
131
+ #LoadModule lua_module modules/mod_lua.so
132
+ LoadModule env_module modules/mod_env.so
133
+ #LoadModule mime_magic_module modules/mod_mime_magic.so
134
+ #LoadModule cern_meta_module modules/mod_cern_meta.so
135
+ #LoadModule expires_module modules/mod_expires.so
136
+ LoadModule headers_module modules/mod_headers.so
137
+ #LoadModule ident_module modules/mod_ident.so
138
+ #LoadModule usertrack_module modules/mod_usertrack.so
139
+ #LoadModule unique_id_module modules/mod_unique_id.so
140
+ LoadModule setenvif_module modules/mod_setenvif.so
141
+ LoadModule version_module modules/mod_version.so
142
+ #LoadModule remoteip_module modules/mod_remoteip.so
143
+ LoadModule proxy_module modules/mod_proxy.so
144
+ #LoadModule proxy_connect_module modules/mod_proxy_connect.so
145
+ #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
146
+ #LoadModule proxy_http_module modules/mod_proxy_http.so
147
+ LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
148
+ #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
149
+ #LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
150
+ #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
151
+ #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
152
+ #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
153
+ #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
154
+ #LoadModule proxy_express_module modules/mod_proxy_express.so
155
+ #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
156
+ #LoadModule session_module modules/mod_session.so
157
+ #LoadModule session_cookie_module modules/mod_session_cookie.so
158
+ #LoadModule session_crypto_module modules/mod_session_crypto.so
159
+ #LoadModule session_dbd_module modules/mod_session_dbd.so
160
+ #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
161
+ #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
162
+ #LoadModule ssl_module modules/mod_ssl.so
163
+ #LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
164
+ #LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
165
+ #LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
166
+ #LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
167
+ #LoadModule dialup_module modules/mod_dialup.so
168
+ #LoadModule http2_module modules/mod_http2.so
169
+ #LoadModule proxy_http2_module modules/mod_proxy_http2.so
170
+ #LoadModule md_module modules/mod_md.so
171
+ #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
172
+ #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
173
+ #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
174
+ #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
175
+ LoadModule unixd_module modules/mod_unixd.so
176
+ #LoadModule heartbeat_module modules/mod_heartbeat.so
177
+ #LoadModule heartmonitor_module modules/mod_heartmonitor.so
178
+ #LoadModule dav_module modules/mod_dav.so
179
+ LoadModule status_module modules/mod_status.so
180
+ LoadModule autoindex_module modules/mod_autoindex.so
181
+ #LoadModule asis_module modules/mod_asis.so
182
+ #LoadModule info_module modules/mod_info.so
183
+ #LoadModule suexec_module modules/mod_suexec.so
184
+ <IfModule !mpm_prefork_module>
185
+ #LoadModule cgid_module modules/mod_cgid.so
186
+ </IfModule>
187
+ <IfModule mpm_prefork_module>
188
+ #LoadModule cgi_module modules/mod_cgi.so
189
+ </IfModule>
190
+ #LoadModule dav_fs_module modules/mod_dav_fs.so
191
+ #LoadModule dav_lock_module modules/mod_dav_lock.so
192
+ #LoadModule vhost_alias_module modules/mod_vhost_alias.so
193
+ #LoadModule negotiation_module modules/mod_negotiation.so
194
+ LoadModule dir_module modules/mod_dir.so
195
+ #LoadModule imagemap_module modules/mod_imagemap.so
196
+ #LoadModule actions_module modules/mod_actions.so
197
+ #LoadModule speling_module modules/mod_speling.so
198
+ #LoadModule userdir_module modules/mod_userdir.so
199
+ LoadModule alias_module modules/mod_alias.so
200
+ LoadModule rewrite_module modules/mod_rewrite.so
201
+
202
+ <IfModule unixd_module>
203
+ #
204
+ # If you wish httpd to run as a different user or group, you must run
205
+ # httpd as root initially and it will switch.
206
+ #
207
+ # User/Group: The name (or #number) of the user/group to run httpd as.
208
+ # It is usually good practice to create a dedicated user and group for
209
+ # running httpd, as with most system services.
210
+ #
211
+ User www-data
212
+ Group www-data
213
+
214
+ </IfModule>
215
+
216
+ # 'Main' server configuration
217
+ #
218
+ # The directives in this section set up the values used by the 'main'
219
+ # server, which responds to any requests that aren't handled by a
220
+ # <VirtualHost> definition. These values also provide defaults for
221
+ # any <VirtualHost> containers you may define later in the file.
222
+ #
223
+ # All of these directives may appear inside <VirtualHost> containers,
224
+ # in which case these default settings will be overridden for the
225
+ # virtual host being defined.
226
+ #
227
+
228
+ #
229
+ # ServerAdmin: Your address, where problems with the server should be
230
+ # e-mailed. This address appears on some server-generated pages, such
231
+ # as error documents. e.g. admin@your-domain.com
232
+ #
233
+ ServerAdmin you@example.com
234
+
235
+ #
236
+ # ServerName gives the name and port that the server uses to identify itself.
237
+ # This can often be determined automatically, but we recommend you specify
238
+ # it explicitly to prevent problems during startup.
239
+ #
240
+ # If your host doesn't have a registered DNS name, enter its IP address here.
241
+ #
242
+ #ServerName www.example.com:80
243
+
244
+ #
245
+ # Deny access to the entirety of your server's filesystem. You must
246
+ # explicitly permit access to web content directories in other
247
+ # <Directory> blocks below.
248
+ #
249
+ <Directory />
250
+ AllowOverride All
251
+ Require all granted
252
+ </Directory>
253
+
254
+ #
255
+ # Note that from this point forward you must specifically allow
256
+ # particular features to be enabled - so if something's not working as
257
+ # you might expect, make sure that you have specifically enabled it
258
+ # below.
259
+ #
260
+ <FilesMatch \.php$>
261
+ SetHandler "proxy:fcgi://php:9000"
262
+ </FilesMatch>
263
+ #
264
+ # DocumentRoot: The directory out of which you will serve your
265
+ # documents. By default, all requests are taken from this directory, but
266
+ # symbolic links and aliases may be used to point to other locations.
267
+ #
268
+ DocumentRoot "/app/web"
269
+ <Directory "/app/web">
270
+ #
271
+ # Possible values for the Options directive are "None", "All",
272
+ # or any combination of:
273
+ # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
274
+ #
275
+ # Note that "MultiViews" must be named *explicitly* --- "Options All"
276
+ # doesn't give it to you.
277
+ #
278
+ # The Options directive is both complicated and important. Please see
279
+ # http://httpd.apache.org/docs/2.4/mod/core.html#options
280
+ # for more information.
281
+ #
282
+ Options Indexes FollowSymLinks
283
+
284
+ #
285
+ # AllowOverride controls what directives may be placed in .htaccess files.
286
+ # It can be "All", "None", or any combination of the keywords:
287
+ # AllowOverride FileInfo AuthConfig Limit
288
+ #
289
+ AllowOverride All
290
+
291
+ #
292
+ # Controls who can get stuff from this server.
293
+ #
294
+ Require all granted
295
+ </Directory>
296
+
297
+ #
298
+ # DirectoryIndex: sets the file that Apache will serve if a directory
299
+ # is requested.
300
+ #
301
+ <IfModule dir_module>
302
+ DirectoryIndex index.php
303
+ </IfModule>
304
+
305
+ #
306
+ # The following lines prevent .htaccess and .htpasswd files from being
307
+ # viewed by Web clients.
308
+ #
309
+ <Files ".ht*">
310
+ Require all denied
311
+ </Files>
312
+
313
+ #
314
+ # ErrorLog: The location of the error log file.
315
+ # If you do not specify an ErrorLog directive within a <VirtualHost>
316
+ # container, error messages relating to that virtual host will be
317
+ # logged here. If you *do* define an error logfile for a <VirtualHost>
318
+ # container, that host's errors will be logged there and not here.
319
+ #
320
+ ErrorLog /proc/self/fd/2
321
+
322
+ #
323
+ # LogLevel: Control the number of messages logged to the error_log.
324
+ # Possible values include: debug, info, notice, warn, error, crit,
325
+ # alert, emerg.
326
+ #
327
+ LogLevel warn
328
+
329
+ <IfModule log_config_module>
330
+ #
331
+ # The following directives define some format nicknames for use with
332
+ # a CustomLog directive (see below).
333
+ #
334
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
335
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
336
+
337
+ <IfModule logio_module>
338
+ # You need to enable mod_logio.c to use %I and %O
339
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
340
+ </IfModule>
341
+
342
+ #
343
+ # The location and format of the access logfile (Common Logfile Format).
344
+ # If you do not define any access logfiles within a <VirtualHost>
345
+ # container, they will be logged here. Contrariwise, if you *do*
346
+ # define per-<VirtualHost> access logfiles, transactions will be
347
+ # logged therein and *not* in this file.
348
+ #
349
+ CustomLog /proc/self/fd/1 common
350
+
351
+ #
352
+ # If you prefer a logfile with access, agent, and referer information
353
+ # (Combined Logfile Format) you can use the following directive.
354
+ #
355
+ #CustomLog "logs/access_log" combined
356
+ </IfModule>
357
+
358
+ <IfModule alias_module>
359
+ #
360
+ # Redirect: Allows you to tell clients about documents that used to
361
+ # exist in your server's namespace, but do not anymore. The client
362
+ # will make a new request for the document at its new location.
363
+ # Example:
364
+ # Redirect permanent /foo http://www.example.com/bar
365
+
366
+ #
367
+ # Alias: Maps web paths into filesystem paths and is used to
368
+ # access content that does not live under the DocumentRoot.
369
+ # Example:
370
+ # Alias /webpath /full/filesystem/path
371
+ #
372
+ # If you include a trailing / on /webpath then the server will
373
+ # require it to be present in the URL. You will also likely
374
+ # need to provide a <Directory> section to allow access to
375
+ # the filesystem path.
376
+
377
+ #
378
+ # ScriptAlias: This controls which directories contain server scripts.
379
+ # ScriptAliases are essentially the same as Aliases, except that
380
+ # documents in the target directory are treated as applications and
381
+ # run by the server when requested rather than as documents sent to the
382
+ # client. The same rules about trailing "/" apply to ScriptAlias
383
+ # directives as to Alias.
384
+ #
385
+ ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
386
+
387
+ </IfModule>
388
+
389
+ <IfModule cgid_module>
390
+ #
391
+ # ScriptSock: On threaded servers, designate the path to the UNIX
392
+ # socket used to communicate with the CGI daemon of mod_cgid.
393
+ #
394
+ #Scriptsock cgisock
395
+ </IfModule>
396
+
397
+ #
398
+ # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
399
+ # CGI directory exists, if you have that configured.
400
+ #
401
+ <Directory "/usr/local/apache2/cgi-bin">
402
+ AllowOverride None
403
+ Options None
404
+ Require all granted
405
+ </Directory>
406
+
407
+ <IfModule headers_module>
408
+ #
409
+ # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
410
+ # backend servers which have lingering "httpoxy" defects.
411
+ # 'Proxy' request header is undefined by the IETF, not listed by IANA
412
+ #
413
+ RequestHeader unset Proxy early
414
+ </IfModule>
415
+
416
+ <IfModule mime_module>
417
+ #
418
+ # TypesConfig points to the file containing the list of mappings from
419
+ # filename extension to MIME-type.
420
+ #
421
+ TypesConfig conf/mime.types
422
+
423
+ #
424
+ # AddType allows you to add to or override the MIME configuration
425
+ # file specified in TypesConfig for specific file types.
426
+ #
427
+ #AddType application/x-gzip .tgz
428
+ #
429
+ # AddEncoding allows you to have certain browsers uncompress
430
+ # information on the fly. Note: Not all browsers support this.
431
+ #
432
+ #AddEncoding x-compress .Z
433
+ #AddEncoding x-gzip .gz .tgz
434
+ #
435
+ # If the AddEncoding directives above are commented-out, then you
436
+ # probably should define those extensions to indicate media types:
437
+ #
438
+ AddType application/x-compress .Z
439
+ AddType application/x-gzip .gz .tgz
440
+
441
+ #
442
+ # AddHandler allows you to map certain file extensions to "handlers":
443
+ # actions unrelated to filetype. These can be either built into the server
444
+ # or added with the Action directive (see below)
445
+ #
446
+ # To use CGI scripts outside of ScriptAliased directories:
447
+ # (You will also need to add "ExecCGI" to the "Options" directive.)
448
+ #
449
+ #AddHandler cgi-script .cgi
450
+
451
+ # For type maps (negotiated resources):
452
+ #AddHandler type-map var
453
+
454
+ #
455
+ # Filters allow you to process content before it is sent to the client.
456
+ #
457
+ # To parse .shtml files for server-side includes (SSI):
458
+ # (You will also need to add "Includes" to the "Options" directive.)
459
+ #
460
+ #AddType text/html .shtml
461
+ #AddOutputFilter INCLUDES .shtml
462
+ </IfModule>
463
+
464
+ #
465
+ # The mod_mime_magic module allows the server to use various hints from the
466
+ # contents of the file itself to determine its type. The MIMEMagicFile
467
+ # directive tells the module where the hint definitions are located.
468
+ #
469
+ #MIMEMagicFile conf/magic
470
+
471
+ #
472
+ # Customizable error responses come in three flavors:
473
+ # 1) plain text 2) local redirects 3) external redirects
474
+ #
475
+ # Some examples:
476
+ #ErrorDocument 500 "The server made a boo boo."
477
+ #ErrorDocument 404 /missing.html
478
+ #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
479
+ #ErrorDocument 402 http://www.example.com/subscription_info.html
480
+ #
481
+
482
+ #
483
+ # MaxRanges: Maximum number of Ranges in a request before
484
+ # returning the entire resource, or one of the special
485
+ # values 'default', 'none' or 'unlimited'.
486
+ # Default setting is to accept 200 Ranges.
487
+ #MaxRanges unlimited
488
+
489
+ #
490
+ # EnableMMAP and EnableSendfile: On systems that support it,
491
+ # memory-mapping or the sendfile syscall may be used to deliver
492
+ # files. This usually improves server performance, but must
493
+ # be turned off when serving from networked-mounted
494
+ # filesystems or if support for these functions is otherwise
495
+ # broken on your system.
496
+ # Defaults: EnableMMAP On, EnableSendfile Off
497
+ #
498
+ #EnableMMAP off
499
+ #EnableSendfile on
500
+
501
+ # Supplemental configuration
502
+ #
503
+ # The configuration files in the conf/extra/ directory can be
504
+ # included to add extra features or to modify the default configuration of
505
+ # the server, or you may simply copy their contents here and change as
506
+ # necessary.
507
+
508
+ # Server-pool management (MPM specific)
509
+ #Include conf/extra/httpd-mpm.conf
510
+
511
+ # Multi-language error messages
512
+ #Include conf/extra/httpd-multilang-errordoc.conf
513
+
514
+ # Fancy directory listings
515
+ #Include conf/extra/httpd-autoindex.conf
516
+
517
+ # Language settings
518
+ #Include conf/extra/httpd-languages.conf
519
+
520
+ # User home directories
521
+ #Include conf/extra/httpd-userdir.conf
522
+
523
+ # Real-time info on requests and configuration
524
+ #Include conf/extra/httpd-info.conf
525
+
526
+ # Virtual hosts
527
+ #Include conf/extra/httpd-vhosts.conf
528
+
529
+ # Local access to the Apache HTTP Server Manual
530
+ #Include conf/extra/httpd-manual.conf
531
+
532
+ # Distributed authoring and versioning (WebDAV)
533
+ #Include conf/extra/httpd-dav.conf
534
+
535
+ # Various default settings
536
+ #Include conf/extra/httpd-default.conf
537
+
538
+ # Configure mod_proxy_html to understand HTML4/XHTML1
539
+ <IfModule proxy_html_module>
540
+ Include conf/extra/proxy-html.conf
541
+ </IfModule>
542
+
543
+ # Secure (SSL/TLS) connections
544
+ #Include conf/extra/httpd-ssl.conf
545
+ #
546
+ # Note: The following must must be present to support
547
+ # starting without SSL on platforms with no /dev/random equivalent
548
+ # but a statically compiled-in mod_ssl.
549
+ #
550
+ <IfModule ssl_module>
551
+ SSLRandomSeed startup builtin
552
+ SSLRandomSeed connect builtin
553
+ </IfModule>
554
+
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "apache",
3
+ "version": "0.1.0",
4
+ "description": "lab-env docker config for the apache module",
5
+ "scripts": {
6
+ "preversion": "docker login",
7
+ "postversion": "docker build -t fishawack/lab-env-drupal-9-apache:$npm_package_version --target development --platform linux/amd64 -t fishawack/lab-env-drupal-9-apache:latest . && docker push fishawack/lab-env-drupal-9-apache:$npm_package_version && docker push fishawack/lab-env-drupal-9-apache:latest && git add . && git commit -m \"build: Bumped fishawack/lab-env-drupal-9-apache to $npm_package_version\""
8
+ },
9
+ "author": "Mike Mellor",
10
+ "license": "ISC"
11
+ }
@@ -0,0 +1,11 @@
1
+ services:
2
+ apache:
3
+ build:
4
+ context: ./apache/
5
+ dockerfile: Dockerfile
6
+ target: development
7
+ php:
8
+ build:
9
+ context: ./php/
10
+ dockerfile: Dockerfile
11
+ target: development
@@ -18,12 +18,12 @@ services:
18
18
  command: --default-authentication-plugin=mysql_native_password
19
19
  apache:
20
20
  platform: linux/amd64
21
- image: bitnami/apache:2.4.51
21
+ image: fishawack/lab-env-drupal-9-apache:latest
22
+ working_dir: /app
22
23
  networks:
23
24
  - default
24
25
  volumes:
25
26
  - $CWD/:/app
26
- - ./apache/apache.conf:/vhosts/apache.conf:ro
27
27
  - $CWD/themes:/app/web/themes
28
28
  - $CWD/modules:/app/web/modules
29
29
  - $CWD/sites:/app/web/sites
@@ -33,20 +33,13 @@ services:
33
33
  - "${PORT_WEB:-8000}:8080"
34
34
  php:
35
35
  platform: linux/amd64
36
- build:
37
- context: ./php/
38
- dockerfile: Dockerfile
39
- image: lab-env/drupal/9/php:0.0.4
36
+ image: fishawack/lab-env-drupal-9-php:latest
40
37
  init: true
41
38
  working_dir: /app
42
39
  networks:
43
40
  - default
44
- env_file:
45
- - $CWD/.env
46
41
  volumes:
47
42
  - $CWD/:/app
48
- - ./php/custom.ini:/usr/local/etc/php/conf.d/custom.ini
49
- - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
50
43
  - $CWD/themes:/app/web/themes
51
44
  - $CWD/modules:/app/web/modules
52
45
  - $CWD/sites:/app/web/sites
@@ -67,4 +60,4 @@ volumes:
67
60
  mysql:
68
61
  driver: "local"
69
62
  drupal:
70
- driver: "local"
63
+ driver: "local"
@@ -1,14 +1,31 @@
1
- FROM chialab/php:8.1-fpm
1
+ FROM chialab/php:8.1-fpm AS development
2
2
 
3
3
  MAINTAINER Mike Mellor
4
4
 
5
- # Install mysql client
5
+ # Install ghostscript
6
6
  RUN apt-get update && \
7
- apt-get install -y mariadb-client
7
+ apt-get install -y ghostscript
8
8
 
9
- # Install ghostscript
10
- RUN apt-get install -y ghostscript
9
+ # Install mysql client
10
+ RUN apt-get install -y mariadb-client
11
+
12
+ # Copy custom.ini
13
+ COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini
14
+
15
+ # Copy ImageMagick policy
16
+ COPY ./policy.xml /etc/ImageMagick-6/policy.xml
11
17
 
12
18
  # Cleanup apt-get install folders
13
19
  RUN apt-get clean && \
14
- rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
20
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
21
+
22
+ FROM fishawack/lab-env-drupal-9-php:latest AS production
23
+
24
+ # Copy source code into container
25
+ COPY . /app
26
+
27
+ # Install composer dependencies
28
+ RUN TEMPFILE=$(mktemp) && \
29
+ curl -o "$TEMPFILE" "https://getcomposer.org/installer" && \
30
+ php <"$TEMPFILE" && \
31
+ ./composer.phar install -d /app --no-dev --no-interaction --no-ansi --optimize-autoloader
@@ -1 +1,5 @@
1
- memory_limit = -1
1
+ file_uploads = On
2
+ memory_limit = 500M
3
+ upload_max_filesize = 500M
4
+ post_max_size = 500M
5
+ max_execution_time = 600
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "php",
3
+ "version": "0.5.0",
4
+ "description": "lab-env docker config for the php module",
5
+ "scripts": {
6
+ "preversion": "docker login",
7
+ "postversion": "docker build -t fishawack/lab-env-drupal-9-php:$npm_package_version --target development --platform linux/amd64 -t fishawack/lab-env-drupal-9-php:latest . && docker push fishawack/lab-env-drupal-9-php:$npm_package_version && docker push fishawack/lab-env-drupal-9-php:latest && git add . && git commit -m \"build: Bumped fishawack/lab-env-drupal-9-php to $npm_package_version\""
8
+ },
9
+ "author": "Mike Mellor",
10
+ "license": "ISC"
11
+ }
package/globals.js CHANGED
@@ -117,8 +117,15 @@ if(platform === 'laravel'){
117
117
  if(!existsSync(path.join(process.cwd(), '.env'))){
118
118
  copyFileSync(path.join(process.cwd(), '.env.example'), path.join(process.cwd(), '.env'));
119
119
  }
120
+
121
+ let container = `-f ${__dirname}/drupal/9/docker-compose.yml`;
122
+
123
+ // If linked locally then use locally built php image
124
+ if(linked){
125
+ container = `-f ${__dirname}/drupal/9/docker-compose-dev.yml ${container}`;
126
+ }
120
127
 
121
- docker = `docker-compose --env-file ${path.join(process.cwd(), '.env')} -f ${__dirname}/drupal/9/docker-compose.yml ${core} -p ${repo_safe}`;
128
+ docker = `docker-compose --env-file ${path.join(process.cwd(), '.env')} ${container} ${core} -p ${repo_safe}`;
122
129
  } else if(platform === "craftcms"){
123
130
  if(!existsSync(path.join(process.cwd(), '.env'))){
124
131
  copyFileSync(path.join(process.cwd(), '.env.example'), path.join(process.cwd(), '.env'));
@@ -130,12 +137,16 @@ if(platform === 'laravel'){
130
137
  }
131
138
 
132
139
  try{
133
- services = execSync(`${docker} ps --services --filter "status=running" 2>/dev/null`, {encoding: 'utf8'});
140
+ services = execSync(`${docker} ps --services --filter "status=running"`, {encoding: 'utf8', stdio: 'pipe'});
134
141
  running = services.trim().length;
135
142
  exec = `exec ${process.env.CI_BUILD_ID ? '-T' : ''}`;
136
143
  method = running ? exec : 'run --rm --service-ports';
137
144
  run = `${method} core bash -l`;
138
- } catch(e){}
145
+ } catch(e){
146
+ if(args.find(d => d === '--debug')){
147
+ console.log(utilities.colorize(e.stderr, 'error'));
148
+ }
149
+ }
139
150
 
140
151
  // Always allow commands that don't require a repository through
141
152
  if(args[0] !== 'diag' && args[0] !== 'diagnose' && args[0] !== 'origin' && args[0] !== '--version' && args[0] !== '--help' && args[0] !== 'new' && args[0] !== 'key' && args[0] !== 'dekey'){
@@ -148,7 +159,7 @@ if(args[0] !== 'diag' && args[0] !== 'diagnose' && args[0] !== 'origin' && args[
148
159
  console.log(`${utilities.colorize(`@fishawack/lab-env`, 'title')} diagnosis is ${utilities.colorize(`outdated`, 'warning')}.\n\nRun ${utilities.colorize(`fw diagnose`, 'success')} to reconfigure.`);
149
160
  // Stop here if docker process not running
150
161
  } else if(!services) {
151
- console.log(`${utilities.colorize(`Docker`, 'info')} does not appear to be running...`);
162
+ console.log(`${utilities.colorize(`Docker`, 'info')} does not appear to be running...\n\nRun ${utilities.colorize(`fw --debug`, 'success')} for more information`);
152
163
  process.exit();
153
164
  }
154
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-env",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "Docker manager for FW",
5
5
  "main": "cli.js",
6
6
  "scripts": {
@@ -1,13 +0,0 @@
1
- Mutex posixsem
2
- LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
3
-
4
- <VirtualHost *:8080>
5
- DocumentRoot "/app/web"
6
- ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://php:9000/app/web/$1
7
- <Directory "/app/web">
8
- Options Indexes FollowSymLinks
9
- AllowOverride All
10
- Require all granted
11
- DirectoryIndex index.php
12
- </Directory>
13
- </VirtualHost>