From 24a3b33caba288d47439907a19d4faf124cbfff4 Mon Sep 17 00:00:00 2001 From: Thomas Meire Date: Wed, 28 Aug 2024 12:51:57 +0200 Subject: [PATCH] Add an introduction for the project --- .github/workflows/build.yml | 1 + README.md | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b475ae..b4fe538 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,7 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v3 + if: github.ref_type == 'tag' with: registry: ghcr.io username: ${{ github.actor }} diff --git a/README.md b/README.md index 612fd2d..41db047 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# Go Web Template +# Go Web Scaffold + +This Go Web Scaffold is a ready-to-go project that will get you going with your Go web application straight out of the door, with all the nuts and bolt that you expect in your projects: a decent project layout, tablestakes app plumbing, a local development setup, a proper CI pipeline with artifact publishing, and more... + +The core philosophies of this scaffold are __simplicity__ and __efficiency__. The scaffold should be self-explanatory and easy to use for anyone who's seen a Go project before. You shouldn't need to search within the codebase for a piece of functionality. You shouldn't need to learn extra tools besides Go to get started. You shouldn't have to jump though a ton of configuration to get going. The scaffold should also not be doing anything that causes useless overhead, neither in the build process nor in the actual application. It shouldn't publish build artifacts that noone ever looks at. It shouldn't use CPU or memory hungry libraries by default. ## Getting started @@ -10,7 +14,7 @@ How to get started with the scaffolding: gonew github.com/blackskad/go-web-scaffold github.com/$ACCOUNT/$PROJECTNAME ``` -1. Replace all mentions of go-web-scaffold with your own project name. At the moment, that's in the Dockerfile and in the GitHub build workflow. +1. Replace all mentions of go-web-scaffold with your own project name. At the moment, that's in the [Dockerfile](https://github.com/blackskad/go-web-scaffold/blob/main/Dockerfile#L25) and in the GitHub [build workflow](https://github.com/blackskad/go-web-scaffold/blob/main/.github/workflows/build.yml#L53). ``` sed -i 's/blackskad\/go-web-scaffold/$ACCOUNT\/$PROJECTNAME/g' . ``` @@ -42,7 +46,9 @@ While the app can be build and run with plain Go commands, it's intended to be b ### Docker compose -To allow you to easily run the service locally without much local config, a docker-compose.yaml file is included. This file will include everything to run a minimal stack. +To allow you to easily run the service locally without having to install a lot of local dependencies, a docker-compose.yaml file is included. This file includes everything to run a minimal stack. + +Run `docker compose up --build` to make the service accessible [locally on port 8080](http://localhost:8080) ### GitHub CI pipeline