From 8e072824e4a541e0faf01c6bc90a96511f8bef03 Mon Sep 17 00:00:00 2001 From: Aljaz S Date: Tue, 16 Nov 2021 21:17:16 +0100 Subject: [PATCH] make the app deployable on gitapp.si --- .gitlab-ci.yml | 14 ++++++++++++++ Dockerfile | 10 ++++++++++ captain-definition | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile create mode 100644 captain-definition diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5b77d50 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,14 @@ +deploy: + image: alpine:latest + stage: deploy + variables: + GITAPP_URL: https://gitapp.si + GITAPP_NAME: upn-qr + tags: + - exec-docker + script: + - apk add nodejs~=14 npm git + - npm install --global caprover + - caprover deploy --caproverUrl $GITAPP_URL --appToken $GITAPP_TOKEN --appName $GITAPP_NAME --branch origin/master + only: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c5f9c26 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM alpine + +WORKDIR /home + +RUN apk add nodejs yarn + +COPY src/ /home/ +RUN yarn install + +CMD [ "yarn", "run", "start" ] \ No newline at end of file diff --git a/captain-definition b/captain-definition new file mode 100644 index 0000000..04859b5 --- /dev/null +++ b/captain-definition @@ -0,0 +1,4 @@ +{ + "schemaVersion": 2, + "dockerfilePath": "./Dockerfile" +} \ No newline at end of file