set the variables inside of appsettings.Development.json
and remove the .Development
portion of the file extension
this deployment guide is tailored for debian based operating systems
it is tested against ubuntu 20.04
if you kinda-sorta already know what you are doing, you can install docker and docker-compose on an ubuntu box with docker-install.sh
in the scripts directory
- install
docker engine
(https://docs.docker.com/engine/install/)
$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt update
$ sudo apt install docker-ce docker-ce-cli containerd.io
- install
docker compose
(https://docs.docker.com/compose/install)
$ sudo apt install docker-compose
- execute
define-secrets.sh
to define the SQL and SMTP secrets
$ sudo chmod +x ~/wrenstone/scripts/define-secrets.sh
$ ~/wrenstone/scripts/define-secrets.sh
note: you could also define and then remove the
.default
extension from each file in thesecrets
folder
- create docker volumes for the database and SSL certificate
$ sudo docker volume create wrenstone-db
$ sudo docker volume create wrenstone-ssl
- build and run the composition
$ sudo docker-compose -f docker-compose-debug.yml build
$ sudo docker-compose -f docker-compose-debug.yml up -d
the nginx
service will generate the SSL certificate
it will also renew the certificate before it expires
the api
service will automagically apply migrations and update the database each time it starts