Skip to content

CopenhagenCityArchives/kbhbilleder-docker

Repository files navigation

kbhbilleder-docker

Docker setup for kbhbilleder.

Requirements

  1. Install Docker
  2. Optionally, installe something like Dory to gain local access to the site via .docker hostnames.
  3. More than 2GB RAM allocated in Docker (otherwise elasticsearch exits with code 137)

Get started

The following guide will utilize a Makefile for most tasks, inspect the Makefile for the manual steps if you are unable to use make.

  1. Clone this repo
  2. Clone kbh-billeder into projects/ by running make clone
  3. Add an .env file to ./kbhbilleder/
  4. run make up, then run make index-all to index all assets into the environment (this can also be done in one go by running make reset ).
  5. Go to kbhbilleder.docker in your browser if you are using a docker proxy like dory or use docker-compose ps to determine which localhost port to use if not.

Tips & tricks

  • Output from the node container: make logs
  • If gulp stops because of an error, you can run: docker-compose exec node npm run gulp
  • Changes in package.json should invalidate the Docker image cache. If it doesn't rebuild, run docker-compose up --force-rebuild --build
  • You can run npm install inside the container with docker-compose exec node npm install
  • Start indexing with make index-all
  • If you make changes to your local projects and need a dev-env image for it (read: you made major changes to package.json) run make build-dev-env-local
  • If you need direct access to elastic in production or beta, see make forward-es-prod and forward-es-beta.