gathering / wannabe

Event-system for TG - wannabe.gathering.org
GNU General Public License v3.0
12 stars 7 forks source link

Production containers #41

Closed niccofyren closed 4 years ago

niccofyren commented 4 years ago

A bunch of tweaks to docker setup to make it work across both development and production setups. Suggest we squash this on merge.

See updated documentation for usage instructions, but in summary:

  1. Make sure you are using development or production setup in .env file
  2. docker-compose build --build-arg GIT_BRANCH=production-containers app // To make sure this branch is used
  3. docker-compose up

To try php7 versions a --build-arg PHP_VERSION=7 argument could be used with composer-build (or set in docker-compose.*.yml files).

PS! If testing with production configuration make sure to mount the "correct" app/Config files into your container. The production env expect these to be provided from another location than the wannabe repo. Example:

services:
  app:
    volumes:
      - app-webroot:/var/www/html/wannabe/app/webroot
      - ./database.php:/var/www/html/wannabe/app/Config/database.php:ro
      - ./core.php:/var/www/html/wannabe/app/Config/core.php:ro
      - ./bootstrap.php:/var/www/html/wannabe/app/Config/bootstrap.php:ro
niccofyren commented 4 years ago

Going to merge this today to facilitate our wannabe move to new docker environment. None of the changes here should affect non-docker/container usage, so should be pretty safe.