jhannah / legislature_calendar

Calendars of legislature activity
Do What The F*ck You Want To Public License
2 stars 2 forks source link

Add a deployment process #10

Open nitrocode opened 2 years ago

nitrocode commented 2 years ago

At the moment, this is a server with a simple bootstrap script and a manually loaded db.

Things to do

Current bootstrap

Current bootstrap ```bash #!/bin/bash ## Security updates sudo apt update sudo apt upgrade ## Setup Docker ## TODO: remove this when the golang release process is finished sudo apt install -y apt-transport-https ca-certificates curl software-properties-common 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=$(dpkg --print-architecture) 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 -y make docker-ce mkdir -p /opt git clone https://github.com/jhannah/legislature_calendar.git /opt/app make build -f /opt/app/Makefile ## TODO: build db or manually upload leg.sqlite3 ## TODO: when db storage is available, no need to use leg.sqlite3 docker run -d -p 80:80 --rm --init --tty -e PORT=80 legislative_calendar ## TODO: Setup NGINX ## TODO: Setup lets encrypt # sudo apt install -y certbot python3-certbot-apache ```

references