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.
FROM elixir:1.11.2
ARG env=dev
ENV LANG=en_US.UTF-8 \
TERM=xterm \
MIX_ENV=$env
WORKDIR /opt/build
ADD ./bin/build ./bin/build
CMD ["bin/build"]
#!/usr/bin/env bash
touch lib/central_web/views/admin/general_view.ex
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
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