From 030e89d23902e8771f3ed3cecde483ba74400c3b Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 6 Jan 2019 19:15:33 +0000 Subject: [PATCH] Convert the example file to a proper readme with examples and additional details --- docker/README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ docker/example | 12 ----------- 2 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 docker/README.md delete mode 100644 docker/example diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..a7cd859 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,56 @@ +# Halcyon Docker + +This Docker setup for Halcyon includes just Halcyon, php-fpm and the necessary locales for internationalization support in Halcyon. + +You'll need to use the main repo's nginx/apache/caddy configs for reverse proxy to the container. traefik will likely work but is untested. + +# Build Halcyon Container + +``` sh + +cd /opt/halcyon/docker +docker build -t halcyon/halcyon:latest . + +``` + +# Configuration + +The container has the official example configs stored at ```/var/www/html/config``` inside the image. You can copy the examples from the container to the server via a temporary container and volume. + +The configs must be adjusted ahead of running the container for production use. + +Please note: The container build will checkout the latest release of Halcyon which may *not* match the current master brach HEAD. It's advisable to use the below to copy the configs so you're using the same config examples as the version deployed in the container. + +Example: + +``` sh + +cd /opt/halcyon +mkdir config +docker run --rm -it \ + --entrypoint /bin/sh \ + -v /opt/halcyon/config:/var/www/html/config \ + halcyon/halcyon:latest +cp /var/www/html/config.example/* /var/www/html/config/ +exit + +``` + +# Running + +An example for running the container is below. + +``` sh + +docker run \ + --name halcyon \ + --restart unless-stopped \ + --net docker-private \ + --ip 172.30.12.13 \ + -e TZ=UTC \ + -e DEBUG=1 \ + -v /opt/halcyon/config:/var/www/html/config \ + halcyon/halcyon:latest + +``` + diff --git a/docker/example b/docker/example deleted file mode 100644 index 5abd7c3..0000000 --- a/docker/example +++ /dev/null @@ -1,12 +0,0 @@ -docker build -t halcyon/halcyon:latest . -docker run --rm -it -p 9081:80 -v ${PWD}/config:/var/www/html/config test/halcyon:latest -docker run \ - --name halcyon \ - --restart unless-stopped \ - --net docker-private \ - --ip 172.30.12.13 \ - -e TZ=UTC \ - -e DEBUG=1 \ - -v /opt/halcyon/config:/var/www/html/config \ - test/halcyon:latest -