74 lines
1.9 KiB
Plaintext
74 lines
1.9 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
|
|
|
|
| git | https://git.192.168.1.151.nip.io:8543[] |
|
|
| woodpecker | https://ci.192.168.1.151.nip.io:8543[] |
|
|
| Traefik Dashboard | http://traefik.192.168.1.151.nip.io:8181[] |
|
|
|===
|
|
|
|
First start forgejo using:
|
|
|
|
`docker compose up -d traefik forgejo`
|
|
|
|
And then register an (admin) user in forgejo.
|
|
|
|
E.g., fjadmin / admin123 / fjadmin@localhost.de
|
|
|
|
Setup > Applications > oauth2 apps
|
|
|
|
woodpecker / https://ci.192.168.1.151.nip.io:8543/authorize
|
|
|
|
note client-id and client-secret and enter this in .env for.
|
|
|
|
Now you can start everything using `docker compose up -d`.
|
|
|
|
== Chaning 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.192.168.1.151.nip.io:8543 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.192.168.1.151.nip.io: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.
|