Git Product home page Git Product logo

site1's Introduction

Kamal static site template

This is a template for a static site that can easily be deployed to a single server together with other static sites with Kamal.

The site is automatically configured with SSL certificates from Let's Encrypt, and is served via nginx.

First setup

On a freshly created server, run:

ssh root@SERVER_IP_ADDRESS -- mkdir -p /letsencrypt && touch /letsencrypt/acme.json && chmod 600 /letsencrypt/acme.json

Than edit the .env file and config/deploy.yml and enter your configuration.

First ensure that you've set GIT_URL to a repository address with a valid access token embedded in the .env file. This access token must have access to pull from the git repository in question (see personal access tokens for GitHub for an example).

Then you must also setup an access token for your Docker image repository (see Create and manage access tokens for Docker Hub for an example).

Finally, you must add the server address into config/deploy.yml, and ensure that the image and repository configurations are correct.

Than run kamal setup to setup the server for the first time.

Adding a new site to the server

  1. Create a new git repository for the project
  2. Edit .env and config/deploy.yml
  3. Push the changes to git
  4. Run: kamal env push
  5. Run kamal deploy

Deploying configuration changes

If you change the configuration, run kamal deploy to deploy the changes to the server. It takes about 60 seconds.

Deploying site changes

Changes checked into git are automatically pulled onto the Kamal server every 10 seconds. So all you have to do is checkin your changes and push them.

site1's People

Contributors

igorj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.