proofreading

This commit is contained in:
2022-02-27 21:34:35 +01:00
parent ac96fac378
commit 2aff89e590
6 changed files with 97 additions and 21 deletions

View File

@ -30,8 +30,10 @@ Let's do `sudo mkdir /mnt/storage-pool/gitea`
Then create a new `gitea` stack :
{{< highlight host="stack" file="gitea" >}}
```yml
version: '3.8'
version: '3'
services:
gitea:
@ -57,6 +59,8 @@ networks:
external: true
```
{{< /highlight >}}
{{< alert >}}
We added a specific TCP router in order to allow SSH cloning. The SSH Traefik entry point will redirect to the first available service with TCP router.
Note as we need to indicate entry points in order to avoid bad redirection from other HTTPS based service.
@ -86,8 +90,10 @@ Before attack the CI/CD part, we should take care of where we put our main docke
We'll use the official docker registry with addition of nice simple UI for images navigation. It's always the same, do `sudo mkdir /mnt/storage-pool/registry` and create `registry` stack :
{{< highlight host="stack" file="registry" >}}
```yml
version: '3.3'
version: '3'
services:
app:
@ -129,6 +135,8 @@ networks:
external: true
```
{{< /highlight >}}
{{< alert >}}
Note as both service must be exposed to Traefik. In order to keep the same subdomain, we made usage of `PathPrefix` feature provided by Traefik with `/v2`.
It gives us have an additional condition for redirect to the correct service. It's ok in our case because the official docker registry use only `/v2` as endpoint.
@ -207,8 +215,10 @@ Let's follow [the official docs](https://docs.drone.io/server/provider/gitea/) f
Save and keep the client and secret tokens. Then create a new `drone` PostgreSQL database and create a new `drone` stack :
{{< highlight host="stack" file="drone" >}}
```yml
version: '3.8'
version: '3'
services:
drone:
@ -253,6 +263,8 @@ networks:
external: true
```
{{< /highlight >}}
{{< alert >}}
Don't forget to have proper docker labels on nodes, as explain [here]({{< ref "04-build-your-own-docker-swarm-cluster-part-3#add-environment-labels" >}}), otherwise docker runner will not run because of `node.labels.environment == build`.
{{< /alert >}}
@ -401,8 +413,10 @@ If all's going well, the final image should be pushed in our docker registry. Yo
Our application is now ready for production deployment ! Let's create our new shiny `weather` stack :
{{< highlight host="stack" file="weather" >}}
```yml
version: "3"
version: '3'
services:
app:
@ -424,6 +438,8 @@ networks:
external: true
```
{{< /highlight >}}
{{< alert >}}
I use `Development` in order to have the swagger UI.
Be sure to have registered the private registry in Portainer before deploying as [explained here](#register-registry-in-portainer).