Commit 89ab1379 authored by Jacob Priddy's avatar Jacob Priddy 👌

look for files

parent 610e7a05
Pipeline #13209 failed with stages
in 1 minute and 24 seconds
......@@ -90,25 +90,28 @@ deploy application:
- elock
stage: deploy
script:
# Delete previous unneeded artifacts
- >
rm -rf src/backend/cov
src/backend/vendor
src/backend/tests
src/frontend
src/install-dev.sh
src/backend/node_modules
- docker-compose -f docker-compose.prod.yml build
- docker build -t $DOORCODE_IMAGE_NAME -f prod.Dockerfile .
- docker build -t $NGINX_IMAGE_NAME -f nginx.Dockerfile .
- docker-compose -f docker-compose.prod.yml down
- sed -i "s/\(^DB_PASSWORD=\).*/\1$(cat $POSTGRES_PASSWORD)/" $PROJ_DIR/.env
- docker-compose -f docker-compose.prod.yml up -d
# Give it some time to spin up...
- sleep 10
# Make sure app is running
- "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api"
- "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api/docs"
- echo $POSTGRES_PASSWORD
- ls /builds/elock/doorcode.tmp
# # Delete previous unneeded artifacts
# - >
# rm -rf src/backend/cov
# src/backend/vendor
# src/backend/tests
# src/frontend
# src/install-dev.sh
# src/backend/node_modules
# - docker-compose -f docker-compose.prod.yml build
# - docker build -t $DOORCODE_IMAGE_NAME -f prod.Dockerfile .
# - docker build -t $NGINX_IMAGE_NAME -f nginx.Dockerfile .
# - docker-compose -f docker-compose.prod.yml down
# - sed -i "s/\(^DB_PASSWORD=\).*/\1$(cat $POSTGRES_PASSWORD)/" $PROJ_DIR/.env
# - docker-compose -f docker-compose.prod.yml up -d
# # Give it some time to spin up...
# - sleep 10
# # Make sure app is running
# - "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api"
# - "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api/docs"
- exit 1
environment:
name: production
url: https://elock.cs.wallawalla.edu/api
......
FROM node:15.4-alpine as frontend_assets
WORKDIR /app
COPY src/backend/public public
COPY src/backend/resources resources
COPY src/backend/package.json src/backend/package-lock.json src/backend/webpack.mix.js ./
RUN npm install && npm run prod
FROM nginx:1.19.5-alpine
WORKDIR /var/www
COPY src/ ${WORKDIR}
COPY --from=doorcode/app:master /var/www ${WORKDIR}
COPY simplesamlphp-1.19.0-rc1/ ../simplesamlphp
COPY nginx/conf.d/prod.conf /etc/nginx/conf.d/prod.conf
COPY nginx/dhparam/ /run/dhparam
RUN rm -rf backend/cov backend/vendor backend/public \
../simplesamlphp/modules/exampleauth/enable \
backend/tests frontend backend/install-dev.sh install-dev.sh \
backend/node_modules
COPY --from=frontend_assets /app/public backend/public
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