#6 Dockerfile added, documentation updated, port changed from 80->8080

master
Thijs de Vries 5 years ago
parent adfa57bb14
commit da115e6a36

@ -30,5 +30,21 @@ WIP
## Deploy your own ## Deploy your own
Right now you shouldn't do it. This has only been tested by me, and only on a single set-up; mine.
WIP If you wan't to do the alpha-testing, be my guest.
### Docker
There's a docker file included. Install docker on your host, and follow the steps configure, build and run the container.
1. Add a dedicated gitea account to your gitea. Grant collaboration access on every repository you want to integrate. Use a dedicated account because this app will comment in its name.
2. Obtain a nextcloud app password. You may use a dedicated account or your own. Make sure the account has access to your nextcloud Deck board.
3. git clone this repo and go to the 'app' folder `git clone https://git.thijsdevries.net/dodedodo/deck-gitea-integration.git && cd deck-gitea-integration/app`
4. Edit the _*ahem\*_ 'configuration' to your liking. It's located on line 9 and 10 of index.js `vi index.js`
5. After you're done editing, build the container. `docker build . -t deck-gitea-integration:0.0.0-alpine`
6. Run the container !! *Beware, this publishes an untested app on port 80* !! `docker run -d -p 80:8080 --restart always --name deck-gitea deck-gitea-integration:0.0.0-alpine`
7. Optionally run `docker logs deck-gitea -f` to see the output.
After creating/modifying an issue the Deck label will be added to your gitea. A Gitea label will also automatically be created on Deck as soon as it tries to add an issue.
The app is stateless (besides the configuration of course). That means you dont need any persistent volumes, and you can restart the container all you like without damaging any sort of database.
If youre seeing errors in the docker logs, make sure all gitea/nextcloud permisions are set correctly! Secondly check if the URLs seem right. Especially look out for double slashed (//) inside urls.

@ -0,0 +1,5 @@
node_modules
npm-debug.log
Dockerfile
.dockerignore
.gitignore

@ -0,0 +1,9 @@
FROM node:12.6.0-alpine
RUN apk add --no-cache paxctl && paxctl -cm `which node`
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
WORKDIR /home/node/app
COPY --chown=node:node . .
USER node
RUN npm install
EXPOSE 80
CMD [ "node", "index.js" ]

@ -84,4 +84,4 @@ I've re-added the card to Deck.`, repo, issue)
res.send("okay") // generate some feedback for gitea res.send("okay") // generate some feedback for gitea
}) })
app.listen(80, () => console.log(`Listening on :80`)) app.listen(8080, () => console.log(`Listening on :80`))

Loading…
Cancel
Save