Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdonousTech/011d43bdcf4d7467a4d7fe1aa44d6b3a to your computer and use it in GitHub Desktop.
Save AdonousTech/011d43bdcf4d7467a4d7fe1aa44d6b3a to your computer and use it in GitHub Desktop.
lightsail-compose-deso-backend-only
#!/bin/bash
# install latest version of docker the lazy way
curl -sSL https://get.docker.com | sh
# make it so you don't need to sudo to run docker commands
usermod -aG docker ubuntu
# install docker-compose
curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# copy the dockerfile into /srv/docker
# if you change this, change the systemd service file to match
# WorkingDirectory=[whatever you have below]
mkdir /srv/docker
curl -o /srv/docker/docker-compose.yml https://gist.githubusercontent.com/AdonousTech/6ca382f9137fb89d48dfd3975bd4c631/raw/20bebdd06fde9fbf5ecb20cbddb6372a3e8025d4/docker-compose-deso-backend-only.yml
# copy in systemd unit file and register it so our compose file runs
# on system restart
curl -o /etc/systemd/system/docker-compose-app.service https://gist.githubusercontent.com/AdonousTech/2fba381b6a860cc3ffe7ed0563ece5b2/raw/6d2b514d7b35a2738503965183db3980a784c5bf/docker-compose-app.service
systemctl enable docker-compose-app
# start up the application via docker-compose
docker-compose -f /srv/docker/docker-compose.yml up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment