80 lines
2.2 KiB
Plaintext
80 lines
2.2 KiB
Plaintext
= Forgejo
|
|
|
|
You need to find out the official IP address of your computer.
|
|
This can be done using the following command: `./update-ip-addr.sh`
|
|
It updates also the .env file and in this file (so you can easily copy and paste the links)
|
|
|
|
Lets say it is `192.168.1.151` then the URLs for accessing the services are:
|
|
|
|
|===
|
|
|Service | URL | User / Pwd
|
|
|
|
| Traefik Dashboard | http://traefik.demorattermeyer.de[] |
|
|
| git | https://git.demo.rattermeyer.de[] |
|
|
| woodpecker | https://ci.demo.rattermeyer.de[] |
|
|
| mvn ui | https://mvn-ui.demo.rattermeyer.de[] |
|
|
| mvn (repo) | http://mvn.rattermeyer.de[] |
|
|
| Mail | https://mail.demo.rattermeyer.de[] |
|
|
| Docker Registry | https://container.demo.rattermeyer.de[] |
|
|
| Docker Registry UI | https://container-ui.demo.rattermeyer.de[] |
|
|
| NPM Registry / proxy | https://npm.demo.rattermeyer.de[] |
|
|
|===
|
|
|
|
First start forgejo using:
|
|
|
|
`docker compose up -d traefik forgejo`
|
|
|
|
And then register an (admin) user in forgejo.
|
|
|
|
E.g., fjadmin / admin123 / fjadmin@rattermeyer.de
|
|
|
|
Setup > Applications > oauth2 apps
|
|
|
|
woodpecker / https://ci.demo.rattermeyer.de/authorize
|
|
|
|
note client-id and client-secret and enter this in .env for.
|
|
|
|
Now you can start everything using `docker compose up -d`.
|
|
|
|
== Changing IP
|
|
|
|
If the IP address of your computer changes, you have to update some configuration.
|
|
|
|
1. `./update-ip-addr.sh`
|
|
2. `docker exec -it -u root forgejo /bin/ash` and then `vi /data/gitea/conf/app.ini`` and change the IP address.
|
|
3. `docker compose down`
|
|
4. `docker volume rm forgejo_woodpecker``
|
|
5. `docker compose up -d`
|
|
|
|
== Check access to woodpecker
|
|
|
|
Access https://ci.demo.rattermeyer.de and try to login.
|
|
|
|
|
|
== Create and push a repository
|
|
|
|
In forgejo, you should create a new repository, called ci-demo-2.
|
|
|
|
You need to disable ssl verification for this remote in your local git directory:
|
|
|
|
git config http.sslVerify false
|
|
|
|
Then add the repository
|
|
|
|
git remote add origin https://git.demo.rattermeyer.de:8543/fjadmin/ci-demo-2.git
|
|
|
|
and push it
|
|
|
|
git push -u --all origin
|
|
|
|
You need also at least one tag.
|
|
|
|
git push --tags origin
|
|
|
|
== Adding Repo to woodpecker
|
|
|
|
In woodpecker, you need to add the repository.
|
|
It should be listed in the repositories list if you try to add it.
|
|
|
|
You need to "activate" the repository in woodpecker using the button.
|