init commit
This commit is contained in:
95
dokku_notes
Normal file
95
dokku_notes
Normal file
@@ -0,0 +1,95 @@
|
||||
docker ps
|
||||
docker-compose exec web python manage.py makemigrations
|
||||
----------------------------------------
|
||||
https://dokku.com/docs/getting-started/installation/
|
||||
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.30.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.30.7 bash bootstrap.sh
|
||||
|
||||
echo cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin
|
||||
|
||||
echo '<authorized_keys contents here>' | dokku ssh-keys:add admin
|
||||
|
||||
# server ip
|
||||
dokku domains:set-global 45.79.34.63###c_name
|
||||
|
||||
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 ~/.ssh/config
|
||||
# cat ~/.ssh/config
|
||||
'''
|
||||
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
|
||||
'''
|
||||
#add remote
|
||||
dokku@werkoutdev:werkout
|
||||
|
||||
git push dokku@werkoutdev:werkout dev
|
||||
|
||||
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
|
||||
|
||||
----------------------------------------
|
||||
45.79.34.63
|
||||
server root pass - bohxep-pymde8-xakmyG
|
||||
----
|
||||
|
||||
----------------------------------------
|
||||
docker builder prune -a
|
||||
docker system prune -a
|
||||
|
||||
dokku nginx:set werkout client-max-body-size 100m
|
||||
|
||||
dokku storage:mount werkout /var/lib/dokku/data/storage/werkout:/code/media/videos
|
||||
dokku storage:mount werkout /var/lib/dokku/data/storage/werkout:/code/media/hls
|
||||
|
||||
dokku storage:mount werkout /var/lib/dokku/data/storage/werkout:/code/media/exercise_videos
|
||||
|
||||
dokku storage:unmount werkout /var/lib/dokku/data/storage/werkout/exercise_videos:/code/media/exercise_videos
|
||||
dokku storage:unmount werkout /var/lib/dokku/data/storage/werkout/hls:/code/media/hls
|
||||
dokku storage:unmount werkout /var/lib/dokku/data/storage/werkout/videos:/code/media/videos
|
||||
----------------------------------------
|
||||
dokku postgres:info your-database-db
|
||||
postgres://postgres:bf8f1cb443c35cd1ae0a58617ef348cd@dokku-postgres-your-database-db:5432/your_database_db
|
||||
[database type]://[username]:[password]@[host]:[port]/[database name]
|
||||
----------------------------------------
|
||||
dokku enter werkout web
|
||||
video upload chmod 777 on video folder
|
||||
Reference in New Issue
Block a user