Skip to content

mattismoel/konnekt

Repository files navigation

Website for the youth-driven non-profit Konnekt

Konnekt logo

Building the website

The website is consisting of a backend written in Golang and a frontend in React, powered by Vite.

The frontend and backend is proxied behind a Caddy HTTPS reverse proxy. All of this is containerized and run, preferably with Docker Compose.

It is prefered to set up Docker Stack between development machine and the server hosting the website, creating a Docker Context and deploying directly from the development machine.

CI/CD Pipeline

The repository makes use of Github Actions to push tested containers to the repository's Container Registry (see GitHub Docs for more information).

Before a pull request is made from dev to main, both backend and frontend code is tested before being built into their respective images and pushed to the registry. Hereafter it can be deployed using Docker Stack (see below).

Docker Stack Deployment

# Creating the Docker context.
$ docker context create <context_name> --docker "host=ssh://<remote_username>@<domain>"

# Using the newly created Docker context. This makes all docker commands be run remotely. All of the following commands are now run on the remote Docker instance.
$ docker context use <context_name> 

# Initialising and enabling swarm mode on remote.
$ docker swarm init

# Deploying the services with the input compose file.
$ docker stack deploy -c <compose_file_path> <stack_name> --with-registry-auth

About

Website for the youth-driven non-profit platform for local musicians.

Topics

Resources

Stars

Watchers

Forks

Packages