Skip to content

Instantly share code, notes, and snippets.

@codingmatty
Last active April 27, 2024 20:57
Show Gist options
  • Save codingmatty/05922f9dc5dcb75bd8495d62b4211e27 to your computer and use it in GitHub Desktop.
Save codingmatty/05922f9dc5dcb75bd8495d62b4211e27 to your computer and use it in GitHub Desktop.
Reference for setting up an application with Dokku
# These lines only need to be ran once:
dokku plugin:install postgres
dokku letsencrypt:set --global email <your-email@email.com>
dokku letsencrypt:cron-job --add
# This script is meant to be used as a reference to setup an application with a postgres database pointing to a git repository with a Dockerfile
dokku apps:create linkwarden
dokku postgres:create linkwarden-db
dokku postgres:link linkwarden-db linkwarden
# Example of how to store files from the Docker container on the local machine
sudo mkdir -p /opt/linkwarden/data
dokku storage:mount linkwarden /opt/linkwarden/data:/data/data
dokku git:sync linkwarden git@github.com:linkwarden/linkwarden.git main
dokku config:set linkwarden NEXTAUTH_SECRET=`openssl rand -hex 32`
dokku ps:rebuild linkwarden
dokku ports:add linkwarden http:80:5000
dokku domains:add linkwarden linkwarden.your-domain.com
dokku letsencrypt:enabled linkwarden
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment