diff --git a/README.md b/README.md index df051ec..e4219bf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ -# startup +# Sample CI/CD Spring Boot Project -Hallo \ No newline at end of file +This is a sample project to demonstrate CI/CD using Gitea and Gitea Runner. + +## Details +Run actions build a executable .jar file with the help of maven. It contains the basic Spring Boot WebApp wich serves a simple HTML page with sample text to `localhost:8080/`. + +This project uploads configured artifacts. Checkout `.gitea/workflows` for more details. + +The docker compose files used to setup this System can be found in `files` directory. \ No newline at end of file diff --git a/files/docker-compose.yml b/files/docker-compose.yml new file mode 100644 index 0000000..d4780d3 --- /dev/null +++ b/files/docker-compose.yml @@ -0,0 +1,41 @@ +version: "3" + +networks: + gitea: + external: false + +services: + giteaserver: + image: gitea/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=giteadbdb:3306 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" + giteadbdb: + image: mysql:8 + restart: always + environment: + - MYSQL_ROOT_PASSWORD=gitea + - MYSQL_USER=gitea + - MYSQL_PASSWORD=gitea + - MYSQL_DATABASE=gitea + networks: + - gitea + volumes: + - ./mysql:/var/lib/mysql + diff --git a/files/docker-compose2.yml b/files/docker-compose2.yml new file mode 100644 index 0000000..9cdb084 --- /dev/null +++ b/files/docker-compose2.yml @@ -0,0 +1,18 @@ +version: '3.8' + +networks: + gitea: + external: true +services: + gitea_act_runner: + image: gitea/act_runner:nightly + restart: always + networks: + - gitea + volumes: + - /var/run/docker.sock:/var/run/docker.sock:rw + - /opt/gitea_runner_data:/data:rw + environment: + TZ: "Europe/Berlin" + GITEA_INSTANCE_URL: 'https://git.walzen665.de' + GITEA_RUNNER_REGISTRATION_TOKEN: ''