Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.07 KB

DOCKER_README.md

File metadata and controls

32 lines (25 loc) · 1.07 KB

Docker-Compose

This guide will help you setup a docker swarm environment for running the HackTheArch platform. Note that this compose file does not include a reverse proxy, and to simplify things, does not provide TLS/SSL. We highly suggest you deploy HackTheArch with TLS! Using a reverse proxy can do this for you. Something like nginx, or Caddy will work just fine.

Moving on, to make sure the environment is setup for your deployment, copy .env_sample to .env and set desired variables in it (most importantly SECRET_KEY_BASE, you can run: bundle exec rails secret to get a sufficient key, but a long random string is just fine).

Finally, from the root directory:

  1. Deploy the stack
docker stack deploy -c prod-stack.yml hackthearch
  1. Build the database (find the node that's hosting the hta service), then against the container on that node:
docker exec -it web /bin/sh
rails db:migrate
rails db:seed
rails assets:precompile

HackTheArch should now be browsable on port 3000 on any node in your swarm!