maj .env +process
This commit is contained in:
parent
0f8fa0fced
commit
0df43ef27a
24
.env
24
.env
@ -1,6 +1,20 @@
|
|||||||
POSTGRES_PAASWORD=
|
# DATABASE
|
||||||
|
POSTGRES_DB=
|
||||||
|
POSTGRES_USER=
|
||||||
|
POSTGRES_PASSWORD=
|
||||||
|
|
||||||
|
# GITEA
|
||||||
GITEA_SSH_PORT=
|
GITEA_SSH_PORT=
|
||||||
DRONE_SERVER_PORT=
|
#DRONE_SERVER_PORT=
|
||||||
DRONE_SECRET=
|
#DRONE_SECRET=
|
||||||
ROOT_URL=
|
ROOT_URL="https://git.mondomaine.tld"
|
||||||
SSH_DOMAIN=
|
SSH_DOMAIN="git.mondomaine.tld"
|
||||||
|
DOMAIN="git.mondomaine.tld"
|
||||||
|
|
||||||
|
# DRONE
|
||||||
|
DRONE_GITEA_SERVER="https://git.mondomaine.tld"
|
||||||
|
DRONE_GITEA_CLIENT_ID=""
|
||||||
|
DRONE_GITEA_CLIENT_SECRET=""
|
||||||
|
DRONE_RPC_SECRET=""
|
||||||
|
DRONE_GITEA_GIT_USERNAME=""
|
||||||
|
DRONE_GITEA_GIT_PASSWORD=""
|
62
README.md
62
README.md
@ -1,6 +1,6 @@
|
|||||||
# GITEA DRONE CI DOCKER-COMPOSE DEPLOYEMENT
|
# GITEA DRONE CI DOCKER-COMPOSE DEPLOYEMENT
|
||||||
|
|
||||||
This repository aim to deploy an open-source CI-CD platform with a SCM (Gitea), CI server and runners (Drone) via docker-compose.
|
Stack de déployement de Gitea avec Drone CI pour héberger son code avec des runners pour le CI/CD
|
||||||
|
|
||||||
[Gitea site](https://gitea.io)
|
[Gitea site](https://gitea.io)
|
||||||
|
|
||||||
@ -8,28 +8,70 @@ This repository aim to deploy an open-source CI-CD platform with a SCM (Gitea),
|
|||||||
|
|
||||||
## PRE-REQUIS
|
## PRE-REQUIS
|
||||||
|
|
||||||
- [Docker](https://https://www.google.com)
|
- [Docker](https://www.google.com)
|
||||||
- [Docker-compose](https://www.google.com)
|
- [Docker-compose](https://www.google.com)
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
|
:warning: deployer gitea en premier (sans drone ci)
|
||||||
|
|
||||||
|
### GITEA
|
||||||
|
|
||||||
|
- Renseigner le fichier .env avec le bon nom de domaine
|
||||||
|
|
||||||
|
> Note: nécessite une configuration nginx fonctionnelle
|
||||||
|
|
||||||
|
- deployer gitea:
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
## CONFIG
|
- Créer l'utilisateur admin avec son mot de passe
|
||||||
|
|
||||||
- .env
|
- Dans le profil de l'utilisateur, aller à l'onglet application pour créer l'authentification Oauth2 pour le drone (DRONE_GITEA_CLIENT_ID, DRONE_GITEA_CLIENT_SECRET) et renseigner celles-ci dans le fichier .env
|
||||||
|
|
||||||
- app.ini (thèmes)
|
- Renseigner le DRONE_RPC_SECRET (aéatoire, c'est pour authentifier le drone runner et le drone server entre eux)
|
||||||
|
|
||||||
|
### DRONE CI
|
||||||
|
|
||||||
|
- Renseigner le fichier .env avec le bon nom de domaine, le DRONE_RPC_SECRET (aéatoire, c'est pour authentifier le drone runner et le drone server entre eux) ainsi que le nom d'utilisateur et le mot de passe de l'admin créé plus haut
|
||||||
|
|
||||||
|
|
||||||
|
- deployer drone ci:
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## CONFIGURATION
|
||||||
|
|
||||||
|
- gitea/conf/app.ini
|
||||||
|
```
|
||||||
|
# DNS
|
||||||
|
[server]
|
||||||
|
DOMAIN = gitea.mondomaine.tld
|
||||||
|
SSH_DOMAIN = gitea.mondomaine.tld
|
||||||
|
ROOT_URL = https://gitea.mondomaine.tld/
|
||||||
|
LANDING_PAGE = explore
|
||||||
|
|
||||||
|
# SSO
|
||||||
|
[service]
|
||||||
|
DISABLE_REGISTRATION = true
|
||||||
|
ALLOW_ONLY_EXTERNAL_REGISTRATION = true
|
||||||
|
[openid]
|
||||||
|
ENABLE_OPENID_SIGNIN = true
|
||||||
|
|
||||||
|
# THEMES
|
||||||
|
[ui]
|
||||||
|
THEMES = gitea,arc-green,github,matrix,tangerine-dream,earl-grey
|
||||||
|
DEFAULT_THEME = gitea
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: Pour le SSO, aller dans les la partie administration du site sur gitea, onglet source d'authentificationet ajouter une source d'authentification (pour keycloak: https://adresse-du-keycloak/auth/realms/gregan/.well-known/openid-configuration)
|
||||||
|
|
||||||
## TO DO
|
## TO DO
|
||||||
|
|
||||||
- [x] Drone server config
|
- [ ] Config all via .env
|
||||||
- [x] Config all via .env
|
|
||||||
- [x] Test
|
|
||||||
- [ ] Comments
|
|
||||||
|
|
||||||
## CONTRIBUTING
|
## CONTRIBUTION
|
||||||
|
|
||||||
this docker-compose file is based on https://github.com/ruanbekker/drone-gitea-traefik-docker-blogpost
|
this docker-compose file is based on https://github.com/ruanbekker/drone-gitea-traefik-docker-blogpost
|
@ -21,13 +21,13 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- gitea
|
- gitea
|
||||||
volumes:
|
volumes:
|
||||||
- ./gitea:/data
|
- ./gitea:/data/gitea
|
||||||
- ./config:/etc/gitea
|
- ./config:/etc/gitea
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
- "${SSH_PORT}:22"
|
- "${GITEA_SSH_PORT}:22"
|
||||||
depends_on:
|
depends_on:
|
||||||
- gitea-db
|
- gitea-db
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ services:
|
|||||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||||
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
||||||
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
||||||
- DRONE_ADMIN=${DRONE_ADMIN}
|
- DRONE_ADMIN=${DRONE_GITEA_GIT_USERNAME}
|
||||||
- DRONE_USER_CREATE="username:${DRONE_GITEA_GIT_USERNAME},machine:false,admin:true,token:${DRONE_RPC_SECRET}"
|
- DRONE_USER_CREATE="username:${DRONE_GITEA_GIT_USERNAME},machine:false,admin:true,token:${DRONE_RPC_SECRET}"
|
||||||
- DRONE_SERVER_PROTO=https
|
- DRONE_SERVER_PROTO=https
|
||||||
networks:
|
networks:
|
||||||
@ -107,4 +107,4 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
gitea:
|
gitea:
|
||||||
name: gitea
|
name: gitea
|
||||||
|
Loading…
x
Reference in New Issue
Block a user