From 00407b4461df82223d14ecc1fad1ba3b4e55fb2c Mon Sep 17 00:00:00 2001 From: Dominik Schwind Date: Sat, 10 Nov 2018 13:00:59 +0100 Subject: [PATCH] Readme / data directory --- .gitignore | 2 ++ README.md | 39 +++++++++++++++++++++++++++++++++++++++ data/.gitkeep | 0 docker-compose.yml | 1 + 4 files changed, 42 insertions(+) create mode 100644 data/.gitkeep diff --git a/.gitignore b/.gitignore index e43b0f9..73a7aa8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .DS_Store +/data/* +!data/.gitkeep diff --git a/README.md b/README.md index 83f6f43..ae3a1b7 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,45 @@ Timestamps in Exif data do not include the timezone offset, and there is no stan This will query the database and find the closest matching location for when your clock read that time. +## Docker for local development (experimental) + +This repository comes with a bunch of shell scripts to get a local version of Compass running for development purposes. + +`./docker/start.sh` starts an apache webserver, a mysql database and a redis image +`./docker/build.sh` builds the containers without starting them +`./docker/down.sh` shuts down the containers + +You will still have to manually install Compass within these containers. When creating the `.env` file, the values are as follows: + +``` +BASE_URL=http://localhost/ + +DB_CONNECTION=mysql +DB_HOST=compass_db_1 +DB_PORT=3306 +DB_DATABASE=compass +DB_USERNAME=user +DB_PASSWORD=user + +QUEUE_DRIVER=redis +CACHE_DRIVER=redis + +REDIS_HOST=compass_redis_1 +``` + +The command line commands are a bit tricky, too: + +`docker exec -ti "compass_webserver_1" sh -c "cd compass && composer install"` + +runs the composer install, the `artisan` commands need to be run this way as well. For example the `key:generate` command: + +`docker exec -ti "compass_webserver_1" sh -c "cd compass && php artisan key:generate"` + +and the `migrate` command: + +`docker exec -ti "compass_webserver_1" sh -c "cd compass && php artisan migrate"` + + ## Credits diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker-compose.yml b/docker-compose.yml index 16a77af..4baa392 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,7 @@ services: - db volumes: - .:/var/www/html:cached + - ./data:/var/compass:cached ports: - ${portWebserver}:80 db: