Docker setup for kbhbilleder.
- Install Docker
- Optionally, installe something like Dory to gain local access to the site via .docker hostnames.
- More than 2GB RAM allocated in Docker (otherwise elasticsearch exits with code 137)
The following guide will utilize a Makefile for most tasks, inspect the Makefile for the manual steps if you are unable to use make
.
- Clone this repo
- Clone kbh-billeder into projects/ by running
make clone
- Add an .env file to ./kbhbilleder/
- run
make up
, then runmake index-all
to index all assets into the environment (this can also be done in one go by runningmake reset
). - Go to
kbhbilleder.docker
in your browser if you are using a docker proxy likedory
or usedocker-compose ps
to determine which localhost port to use if not.
- 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, rundocker-compose up --force-rebuild --build
- You can run
npm install
inside the container withdocker-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
andforward-es-beta
.