Deploying on Dokku is straightforward: you only need these steps:
On your dokku server (once per team; the dokku server is shared by the entire team):
-
Create the app:
dokku apps:create team03
-
Enable HTTPS: https://ucsb-cs156.github.io/topics/dokku/enabling_https.html
-
Enable Postgres: https://ucsb-cs156.github.io/topics/dokku/postgres_database.html
-
Setup Google OAuth: https://ucsb-cs156.github.io/topics/oauth/oauth_google_setup.html
-
Setup Environment Variables: https://ucsb-cs156.github.io/topics/dokku/environment_variables.html
-
Sync with repo (substitute your own team name):
dokku git:sync team03 https://github.com/ucsb-cs156-f23/team03-f23-6pm-4 main
We always deploy the
main
branch only on theteam03
deployment, which we consider our "production" deployment (or "prod"). When working in a team environment, it is typical to make sure that no code goes into themain
branch except by a code reviewed pull request. -
Build app:
dokku ps:rebuild team03
Any time you need to redeploy, you can do so by repeating steps 6 and 7.
You can also create a private dev instance on Dokku
where you can try out your changes. That allows you to
deploy branches other than main
and see what happens.
- Create the app:
dokku apps:create team03-yourName-dev
- Do steps (2) through (5) above.
- Sync with repo (substitute your own team name and branch name):
dokku git:sync https://github.com/ucsb-cs156-f23/team03-f23-6pm-4 team03-yourName your-branch-name
- Build app:
dokku ps:rebuild team03-yourName-dev
Any time you need to redeploy, you can do so by repeating steps 3 and 4.