dokku shit

This commit is contained in:
Trey t
2023-06-26 10:24:35 -05:00
parent 6e302bf860
commit 4ab091d610
12 changed files with 296 additions and 8 deletions

61
dokku_notes Normal file
View File

@@ -0,0 +1,61 @@
docker ps
docker-compose exec web python manage.py makemigrations
----------------------------------------
wget https://raw.githubusercontent.com/dokku/dokku/v0.28.1/bootstrap.sh
sudo DOKKU_TAG=v0.28.1 bash bootstrap.sh
cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin
# server ip
dokku domains:set-global ###severip
sudo dokku apps:create werkout
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
sudo dokku postgres:create werkout
sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis
sudo dokku redis:create werkout
sudo dokku postgres:link werkout werkout
sudo dokku redis:link werkout werkout
sudo dokku config:set --no-restart werkout SECRET_KEY=wz%C*@^$QLaFDc$u*wKZK9bV3CBMt7cj3wk2y^0vdu@2*pz7yco+p=7@sa%
#if dev env
sudo dokku config:set --no-restart werkout IS_DEV=True
#push code
# add werkoutDev and werkout to /etc/hosts
'''
Host brodkast
HostName 45.33.120.174
User root
PreferredAuthentications publickey
IdentityFile /Users/treyt/.ssh/bk_linode
IdentitiesOnly yes
AddKeysToAgent yes
# ----------------------------
Host brodkastDev
HostName 45.79.26.38
User root
PreferredAuthentications publickey
IdentityFile /Users/treyt/.ssh/bk_linode
IdentitiesOnly yes
AddKeysToAgent yes
'''
git push dokku@werkoutDev:werkout dokku
git push dokku@werkout:werkout master
dokku run werkout python manage.py createsuperuser
#check if debug
dokku run werkout python manage.py shell
from django.conf import settings
print(settings.DEBUG)
exit()
----------------------------------------
sudo dokku domains:add werkout dev.werkout.io
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
sudo dokku config:set --no-restart --global DOKKU_LETSENCRYPT_EMAIL=werkoutdev@treymail.com
sudo dokku letsencrypt:enable werkout
sudo dokku letsencrypt:cron-job --add
sudo dokku plugin:install https://github.com/dokku/dokku-redirect.git