-
Setup
brew install zgulde/zgulde/codsAnd Create a VPS you have root ssh access to
-
Provision the server
cods init my-awesome-serverProvide the server's IP address, answer a couple questions, then grab a cup of tea while the server is setup.
You'll now have a command named
my-awesome-serverto interact with your server.
Deploying a java spring-boot database backed blog application:
-
Create a database for the site
my-awesome-server db create --name blog_db --user blog_userA random password will be generated for you
-
Setup the site
my-awesome-server site create --domain myblog.com --java --spring-boot --port 8080 # define db secrets... my-awesome-server run vim /srv/myblog.com/application.properties -
Create a file that defines how to build your site
cat > .cods <<. BUILD_COMMAND='./mvnw package' JAR_FILE=$(find target -name \*.jar) . -
Add a git remote and push
my-awesome-server site info -d myblog.comWill give you a copy-pastable command to add a
productionremote. Then:git push production mainAnd you site will build and be live!
-
Create the site
my-awesome-server site create --domain myblog.com --static
-
Add a git remote and push
my-awesome-server site info -d myblog.comWill give you a copy-pastable command to add a
productionremote. Then:git push production mainAnd the contents of your repo will be live on your domain!
-
Create the site
my-awesome-server site create --domain myblog.com --node --port 9000
-
Make sure your application is ready
npm run startshould start your server on the port you specified in the last step -
Add a git remote and push
my-awesome-server site info -d myblog.comWill give you a copy-pastable command to add a
productionremote. Then:git push production mainAnd the contents of your repo will be live on your domain!
-
Create the site
my-awesome-server site create --domain myblog.com --python --port 5000
-
Create a startup script
cat > start_server.sh <<. #!/usr/bin/env bash source env/bin/activate python server.py . chmod +x start_server.sh git add start_server.sh git commit -m 'Add script for managing server startup'
Assuming you are using a virtual environment
-
Add a git remote and push
my-awesome-server site info -d myblog.comWill give you a copy-pastable command to add a
productionremote. Then:git push production mainAnd the contents of your repo will be live on your domain!
my-awesome-server site enablehttps -d myblog.com