33 Commits
Author SHA1 Message Date
Timon de Groot 5a24ca7d50 Scoped environment config loading
Port in https://github.com/davidalger/warden/pull/451

Signed-off-by: Navarr <navarr@swiftotter.com>
2023-01-16 23:03:17 -05:00
David Alger fa70485bba Fixed loadEnvConfig inability to parse .env when CRLF line endings are used
Relates #380
2021-06-02 10:03:41 -05:00
Denis Kopylov 550c1a0ad6 Add xdebug3 support as separate image type 2020-12-22 16:11:08 +03:00
Mads Nielsen 5aac11cf45 Scan for partial env in WARDEN_HOME_DIR to allow customizations 2020-09-10 15:32:29 +02:00
David Alger 12d8452846 Changed mailhog from per-project service to run as a global service
Resolves #175
2020-07-06 11:59:00 -05:00
David Alger ec27e859e0 De-duplicated the extra stuff in 'db' service definition; WARDEN_DB can now be used with any env type having a php-fpm service 2020-06-29 09:17:24 -05:00
David Alger e2242cf143 Load vars prefixed TRAEFIK_ from project .env file when parsing as well to support project bootstrap script 2020-06-26 09:05:50 -05:00
David Alger 7af516aaf9 Updated user-prompt in env-init to read env types from disk 2020-06-22 14:05:25 -05:00
David Alger a6eff4d0eb Refactor out some duplicated docker running assertions 2020-06-20 15:53:56 -05:00
David Alger 202bd36a9f Updated error messaging to use "fatal" and "error" functions where applicable 2020-06-19 22:14:04 -05:00
David Alger 53cc4f39d9 Updated trap, added messaging functions, include core utils globally 2020-06-19 20:26:55 -05:00
David Alger dc86c553c6 Implement svc orchestration command replacing start/stop/up/down/restart commands 2020-06-19 18:48:39 -05:00
David Alger 6ae2384d2c Changed WARDEN_ENV_SUBT to use value of 'linux' rather than 'linux-gnu' on Linux
Somewhat related to #149
2020-05-14 09:26:24 -05:00
David Alger 2659fc8542 Updated WARDEN_ENV_SUBT definition to use a switch case given new value check added in PR #149 and added line to CL 2020-05-14 09:13:50 -05:00
David Alger adfe7048c9 Merge remote-tracking branch 'magenius-team/bug-opensuse-ostype' into feature/environment-template-restructure 2020-05-14 08:56:15 -05:00
Denis Kopylov d3d2449726 Fix for check of OSTYPE on OpenSuse 2020-05-14 11:38:48 +03:00
David Alger 292e3a8922 Renamed common to includes 2020-05-13 14:29:12 -05:00
David Alger 9ebc8bb2fe Refactored base/darwin/linux-gnu logic into the appendEnvPartialIfExists function 2020-05-13 14:29:12 -05:00
David Alger 21dc3e19bf Refactored so appendEnvPartialIfExists will load based on given name from either environments/common OR environments/<type>/ directory 2020-05-13 14:29:12 -05:00
David Alger cbd8c53466 Moved network labels into common declaration 2020-05-13 14:29:12 -05:00
David Alger 5331df4ddd Deduplicate php-fpm and php-debug container service specs
Summary of side-effects of these changes:

* PHP_IDE_CONFIG is specified on both php-fpm and php-debug containers
* Laravel environment will now default to PHP 7.3 (version is not currently being locked in .env file)
* Magento 1 environment will now run default PHP 7.3 unless locked in .env file (it is and has been dumped to .env file as 7.2 for a while now)

The drift in spec resulting from these changes follows:

davidalger:09:12 AM:/sites/testenvs$ for type in local laravel magento1 magento2; do echo "==> comparing $type"; (cd $type; diff -u develop.yml <(warden env config)) done
==> comparing local
==> comparing laravel
--- develop.yml	2020-05-11 11:57:43.000000000 -0500
+++ /dev/fd/63	2020-05-12 09:36:06.000000000 -0500
@@ -53,7 +53,7 @@
       app.config.test: 0.0.0.0
       config.test: 0.0.0.0
     hostname: config-php-debug
-    image: quay.io/warden/php-fpm:7.2-debug
+    image: quay.io/warden/php-fpm:7.3-debug
     volumes:
     - /Users/davidalger/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
     - /Users/davidalger/.composer:/home/www-data/.composer:delegated
@@ -64,6 +64,7 @@
     - db
     environment:
       NODE_VERSION: '10'
+      PHP_IDE_CONFIG: serverName=config-docker
       SSH_AUTH_SOCK: /tmp/ssh-auth.sock
       TRAEFIK_DOMAIN: config.test
       TRAEFIK_SUBDOMAIN: app
@@ -71,7 +72,7 @@
       app.config.test: 0.0.0.0
       config.test: 0.0.0.0
     hostname: config-php-fpm
-    image: quay.io/warden/php-fpm:7.2
+    image: quay.io/warden/php-fpm:7.3
     volumes:
     - /Users/davidalger/.warden/ssl/rootca/certs:/etc/ssl/warden-rootca-cert:ro
     - /Users/davidalger/.composer:/home/www-data/.composer:delegated
==> comparing magento1
--- develop.yml	2020-05-11 11:57:59.000000000 -0500
+++ /dev/fd/63	2020-05-12 09:36:07.000000000 -0500
@@ -66,6 +66,7 @@
     - db
     environment:
       NODE_VERSION: '10'
+      PHP_IDE_CONFIG: serverName=config-docker
       SSH_AUTH_SOCK: /tmp/ssh-auth.sock
       TRAEFIK_DOMAIN: config.test
       TRAEFIK_SUBDOMAIN: app
==> comparing magento2
--- develop.yml	2020-05-11 11:58:04.000000000 -0500
+++ /dev/fd/63	2020-05-12 09:36:07.000000000 -0500
@@ -84,6 +84,7 @@
     - db
     environment:
       NODE_VERSION: '10'
+      PHP_IDE_CONFIG: serverName=config-docker
       SSH_AUTH_SOCK: /tmp/ssh-auth.sock
       TRAEFIK_DOMAIN: config.test
       TRAEFIK_SUBDOMAIN: app
2020-05-13 14:29:12 -05:00
David Alger 7287de446e Moved network name references to normalization function to resolve #127 2020-03-26 17:37:29 -05:00
David Alger 8d649d4409 Refactored how lists of compose yml files is built with aim of deduplicating logic 2020-03-22 13:32:58 -05:00
David Alger 360f4f848d Cleared x bit on sourced script files 2020-03-19 11:54:20 -05:00
David Alger 8636bab91d Updated CLI color resets to be macOS compatible adding it to utils/*.sh as well 2020-03-19 11:52:11 -05:00
David Alger 3cc87c617d Implemented connecting peered services to environment networks on 'warden up' 2020-03-03 17:52:55 -06:00
David Alger 0d8b0f9493 Updated version checks to use much more concise and unit tested comparison logic
Unit tests may be found here: https://gist.github.com/davidalger/97b8cb888216864776fb19ff2180808a
2020-02-29 11:29:00 -06:00
David Alger bce8221686 Updated to use physical vs logical path for running docker-compose on environments
Resolves #101
2020-02-17 11:35:06 -06:00
David Alger dd4a940f8b Updated configuration setup for SSH tunnel container so it will automatically re-instate the needed configuration
Resolves #59
2020-01-05 20:29:13 -06:00
David Alger ac5eba63e3 Fixed edge case where --project-dir passed to docker-compose could be specified incorrectly
If sub-directory included a relative symlink pointing `.env` at parent project's `.env` file, `--project-dir` passed to `docker-compose` could be specified incorrectly when running warden from within the given sub-directory.
2019-08-30 13:05:41 -05:00
David Alger 4702786371 Fixed a few error messages so they won't change shell text color permanently when they output 2019-06-27 09:33:22 -05:00
David Alger 833a33eb56 Changed the env type setup to automatically include additional configuration based on $OSTYPE 2019-06-27 09:18:11 -05:00
David Alger 914d9830ad Added db import/connect commands 2019-06-17 09:56:59 -05:00