Commit 353014ec authored by Vlad Dumitru's avatar Vlad Dumitru
Browse files

add docker deployment setup

parent 7384aa71
Pipeline #6614 failed with stages
image: docker:19.03.12
variables:
DOCKER_TLS_CERTDIR: '/certs'
services:
- docker:19.03.12-dind
stages:
- build-jar
- build-container
- deploy
build-jar:
stage: build-jar
image: openjdk-8-lein
tags:
- docker
script:
- lein uberjar
artifacts:
paths:
- target/uberjar/tunein.jar
build-container:
stage: build-container
image: docker:19.03.12
tags:
- docker
script:
- |
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
docker pull openjdk:8-alpine
docker build -t $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG .
docker push $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG
deploy:
stage: deploy
tags:
- deployment
- tunein
- shell
script:
- |
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
docker-compose pull
docker-compose up --build -d
......@@ -2,6 +2,7 @@ FROM openjdk:8-alpine
COPY target/uberjar/tunein.jar /tunein/app.jar
ENV PORT=3000
EXPOSE 3000
CMD ["java", "-jar", "/tunein/app.jar"]
version: '2.3'
services:
tune_in:
image: registry-git.spsc.tugraz.at/vdumitru/tunein2/main
ports:
- "8182:3000"
restart: always
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment