Commit ffccf8bb authored by Dennis Willers's avatar Dennis Willers 🏀

Initial commit

parents
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
image: docker:latest
stages:
- build
- delete
- deploy
docker-build:
stage: build
script:
- docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker build -t hub.willers.digital/dennis.willers/tabu-middleware .
- docker push hub.willers.digital/dennis.willers/tabu-middleware:latest
delete-old-container:
stage: delete
image: tetraweb/php:7.1
before_script:
- "which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )"
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh-add <(echo "$STAGING_PRIVATE_KEY")
script:
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker stop tabu-middleware"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker rm tabu-middleware"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker rmi -f hub.willers.digital/dennis.willers/tabu-middleware:latest"
only:
- master
allow_failure: true
docker-deploy:
stage: deploy
image: tetraweb/php:7.1
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh-add <(echo "$STAGING_PRIVATE_KEY")
script:
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker login hub.willers.digital -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker pull hub.willers.digital/dennis.willers/tabu-middleware:latest"
- ssh root@willers.digital -p 2233 "/usr/local/bin/docker run -d -p 3150:8080 -p 3000:3000 --restart=always --mount type=bind,src=/volume1/docker/tmp6,dst=/tmp --name tabu-middleware hub.willers.digital/dennis.willers/tabu-middleware:latest"
only:
- master
FROM node:12.18.1
ENV NODE_ENV=production
EXPOSE 8080
EXPOSE 3000
EXPOSE 80
WORKDIR /app
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install --production
COPY . .
CMD [ "node", "index.js" ]
Markdown is supported
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