1
0
Fork 1
mirror of https://gitlab.com/mangadex-pub/mangadex_at_home.git synced 2024-01-19 02:48:37 +00:00

Add Dockerfile and CI Docker build stage

Update CI script

Added Docker DIND

Updated CI and Dockerfile

Another CI update
This commit is contained in:
Yamato 2020-07-02 16:12:34 +00:00 committed by carbotaniuman
parent f77ed40b5b
commit 27465df728
2 changed files with 26 additions and 5 deletions

View file

@ -1,7 +1,7 @@
image: "alpine"
stages:
- build
- publish
- publish_docker
cache:
paths:
@ -19,14 +19,29 @@ publish:
only:
- tags
before_script:
- apk update
- apk add git zip
script:
- apk update && apk add git zip
- export VERSION=`git describe --tags --dirty`
script:
- cp build/libs/mangadex_at_home-${VERSION}-all.jar ./
- zip -r9 mangadex_at_home-${VERSION}.zip mangadex_at_home-${VERSION}-all.jar settings.sample.json
artifacts:
name: "mangadex_at_home-${CI_COMMIT_TAG}"
name: "mangadex_at_home"
paths:
- "*.jar"
- settings.sample.json
publish_docker:
image: docker:git
stage: publish
only:
- tags
services:
- docker:dind
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin ${CI_REGISTRY}
- export VERSION=`git describe --tags --dirty`
script:
- mv build/libs/mangadex_at_home-${VERSION}-all.jar build/libs/mangadex_at_home.jar
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:latest .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:latest

6
Dockerfile Normal file
View file

@ -0,0 +1,6 @@
FROM openjdk:15-alpine
WORKDIR /mangahome
COPY /build/libs/mangadex_at_home.jar .
VOLUME "/mangahome/cache"
EXPOSE 443 8080
CMD java -Dfile-level=off -Dstdout-level=trace -jar mangadex_at_home.jar