Wire up swarm version place holders
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luke Murphy 2020-05-01 17:52:53 +02:00
parent e2456baf68
commit 26cc6c3bb3
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
6 changed files with 94 additions and 0 deletions

View File

@ -14,3 +14,26 @@ trigger:
event:
exclude:
- pull_request
---
kind: pipeline
name: deploy to swarm.autonomic.zone
steps:
- name: deployment
image: decentral1se/drone-stack:19.03.8-override-compose
settings:
compose: docker-compose.yml
host: tcp://swarm.autonomic.zone:2376
override_compose: docker-compose.production.yml
stack_name: gitea
tlsverify: true
environment:
PLUGIN_CACERT:
from_secret: docker_cacert
PLUGIN_CERT:
from_secret: docker_cert
PLUGIN_KEY:
from_secret: docker_key
trigger:
branch:
- master

View File

@ -5,3 +5,21 @@
> https://gitea.io/
> https://git.autonomic.zone
## Development
```bash
$ git clone https://git.autonomic.zone/autonomic-cooperative/gitea && cd gitea
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install -r requirements.txt
$ docker-compose up
```
Gitea dashboard:
> http://localhost:3000
## Production
1. Our [drone.autonomic.zone](https://drone.autonomic.zone/autonomic-cooperative/gitea/) configuration automatically deploys.
1. For a manual deploy guide, see [this documentation](https://git.autonomic.zone/autonomic-cooperative/organising/wiki/working-with-docker-swarm).

View File

@ -0,0 +1,13 @@
---
version: "3.7"
services:
gitea:
image: gitea/gitea:1.11.4
volumes:
- git:/data
ports:
- 3000:3000
volumes:
git:

View File

@ -0,0 +1,31 @@
---
version: "3.7"
services:
gitea:
image: gitea/gitea:1.11.4
volumes:
- git:/data
networks:
- proxy
deploy:
mode: replicated
replicas: 1
update_config:
failure_action: rollback
placement:
constraints:
- node.role == manager
labels:
- "traefik.enable=true"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.http.routers.gitea.rule=Host(`gitea.swarm.autonomic.zone`)"
- "traefik.http.routers.gitea.entrypoints=web-secure"
- "traefik.http.routers.gitea.tls.certresolver=staging"
networks:
proxy:
external: true
volumes:
git:

8
docker-compose.yml Normal file
View File

@ -0,0 +1,8 @@
---
version: "3.7"
services:
gitea:
image: gitea/gitea:1.11.4
ports:
- "3000:3000"

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
docker-compose==1.7.2