Archived
Compare commits
4
Commits
f704afec51
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce6f009473 | ||
|
|
88e4eb7cfc | ||
|
|
8dcb499289 | ||
|
|
ef1953ad62 |
@@ -26,8 +26,9 @@ When a pull request in Gitea references an OpenProject work package (via a URL o
|
|||||||
|
|
||||||
In a pull request title, description, or comment, reference a work package using:
|
In a pull request title, description, or comment, reference a work package using:
|
||||||
|
|
||||||
- A full URL: `https://openproject.example.com/work_packages/42`
|
- Its semantic ID: `KS-10`, `PROJ-42` — matched automatically, no prefix needed
|
||||||
- A short reference: `OP#42` or `OP#PROJ-42`
|
- A prefixed numeric ID: `OP#42` — prefix required to avoid collision with Gitea issue numbers
|
||||||
|
- A full OpenProject URL: `https://openproject.example.com/work_packages/42`
|
||||||
|
|
||||||
Multiple references in the same text are all picked up.
|
Multiple references in the same text are all picked up.
|
||||||
|
|
||||||
@@ -57,9 +58,84 @@ openproject config:set RECOMPILE_ANGULAR_ASSETS=true
|
|||||||
sudo openproject configure
|
sudo openproject configure
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker installation
|
### Docker / docker-compose installation
|
||||||
|
|
||||||
Follow the [OpenProject Docker plugin guide](https://www.openproject.org/docs/installation-and-operations/installation/docker/#openproject-plugins). Add the gem to your custom Gemfile and rebuild the image.
|
The official OpenProject Docker image bakes all gems and frontend assets in at
|
||||||
|
build time, so installing a third-party plugin requires building a custom image.
|
||||||
|
The `docker-compose.yml` provided by OpenProject is overwritten on every update,
|
||||||
|
so all local changes go into `docker-compose.override.yml` and a separate
|
||||||
|
`Dockerfile` that you own.
|
||||||
|
|
||||||
|
#### 1. Clone the plugin
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://github.com/quafzi/openproject-gitea-plugin.git \
|
||||||
|
openproject-gitea-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
Place it anywhere convenient — this guide assumes it sits next to your
|
||||||
|
`docker-compose.yml`.
|
||||||
|
|
||||||
|
#### 2. Create `Dockerfile.gitea`
|
||||||
|
|
||||||
|
```dockerfile
|
||||||
|
FROM openproject/openproject:17
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Copy the plugin source into the image
|
||||||
|
COPY --chown=app:app openproject-gitea-plugin \
|
||||||
|
/app/modules/gitea_integration
|
||||||
|
|
||||||
|
# Register the gem and recompile assets
|
||||||
|
RUN echo 'group :opf_plugins do\n gem "openproject-gitea_integration", path: "modules/gitea_integration"\nend' \
|
||||||
|
> /app/Gemfile.plugins && \
|
||||||
|
cd /app && \
|
||||||
|
bundle install --without development test && \
|
||||||
|
RAILS_ENV=production bundle exec rake \
|
||||||
|
openproject:plugins:register_frontend \
|
||||||
|
assets:precompile
|
||||||
|
|
||||||
|
USER app
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 3. Create `docker-compose.override.yml`
|
||||||
|
|
||||||
|
This file is never touched by OpenProject updates. Point both `web` and
|
||||||
|
`worker` at your custom image — they must use the same image so the plugin is
|
||||||
|
loaded in both processes.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.gitea
|
||||||
|
image: openproject-with-gitea:latest
|
||||||
|
|
||||||
|
worker:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.gitea
|
||||||
|
image: openproject-with-gitea:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
#### 4. Build and start
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker compose build
|
||||||
|
docker compose up -d
|
||||||
|
docker compose exec web bundle exec rails db:migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Updating the plugin
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cd openproject-gitea_integration && git pull && cd ..
|
||||||
|
docker compose build --no-cache
|
||||||
|
docker compose up -d
|
||||||
|
docker compose exec web bundle exec rails db:migrate
|
||||||
|
```
|
||||||
|
|
||||||
### Manual / monorepo installation
|
### Manual / monorepo installation
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user