If you've not already setup your server you might want to check out documents/guides/production_setup_linux.md.
- A production server setup
- Locally running Elixir
- Docker installed on your computer
config/prod.secret.exs
is ignored in the gitignore for obvious reasons. This means you will need to create your own one. Luckily I made a template for you.
A docker file is included in the repo but within documents/prod_files are other docker images providing more control over the building of your image and might be of interest.
#!/usr/bin/env bash
sh scripts/build_container.sh
sh scripts/generate_release.sh
scp -i ~/.ssh/id_rsa rel/artifacts/teiserver.tar.gz [email protected]:/releases/teiserver.tar.gz
mix phx.digest.clean --all
echo "ssh into your server and run dodeploy"
#!/usr/bin/env bash
# This is called from bin/deploy, you should not need to call it manually
docker build --build-arg env=prod \
--build-arg env=prod \
-t teiserver:latest .
#!/usr/bin/env bash
docker run -v $(pwd):/opt/build --rm -it teiserver:latest /opt/build/bin/build