Skip to content
Snippets Groups Projects
Commit 8fafd890 authored by Andrew Kapuscinski's avatar Andrew Kapuscinski
Browse files

Ws 106 dev deployment

parent 64b3608d
No related branches found
No related tags found
1 merge request!108Ws 106 dev deployment
Pipeline #756 failed
......@@ -7,8 +7,8 @@ stages:
- test-coverage
- push-dev
- deploy-coverage-page
- deploy-dev
- .post
# - deploy-dev
# - deploy-test
variables:
......@@ -249,6 +249,17 @@ clean build web:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: always
# Development
deploy dev:
stage: deploy-dev
variables:
ENV: "dev"
script:
- SWARM_NODE_ENV=$ENV TAG_TO_DEPLOY=$CI_DEFAULT_BRANCH docker stack deploy --compose-file docker-compose.${ENV}.yml workspaces-${ENV}
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
# Development
# deploy dev:
# stage: deploy-dev
......
......@@ -17,7 +17,7 @@ COPY ./apps/web ./
# TODO: Run e2e tests here
# Build the angular app
RUN ./node_modules/.bin/ng build --prod --output-path=dist
RUN ./node_modules/.bin/ng build --configuration=test --output-path=dist
# Use nginx base image
FROM nginx:1.19.7-alpine
......
......@@ -3,5 +3,5 @@ export const environment = {
// archive search services
apiUrl: 'https://webtest.aoc.nrao.edu/archiveServices/',
// workspace services
workspacesUrl: 'http://localhost:3457/'
workspacesUrl: 'http://shipman.aoc.nrao.edu:3457/'
};
# Workspaces NGINX config
server {
listen 80;
listen [::]:80;
server_name localhost;
server_name shipman.aoc.nrao.edu;
location / {
root /usr/share/nginx/html;
......@@ -10,6 +10,14 @@ server {
try_files $uri $uri/ /index.html;
}
location ^/capability/(.*) {
proxy_redirect off;
proxy_pass http://shipman.aoc.nrao.edu:3457;
proxy_set_header Origin http://shipman.aoc.nrao.edu:4444;
proxy_hide_header Access-Control-Allow-Origin;
add_header Access-Control-Allow-Origin *;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
......
......@@ -5,8 +5,12 @@ services:
image: marconi.aoc.nrao.edu/workspaces/workflow:${TAG_TO_DEPLOY}
ports:
- "3456:3456"
volumes:
- /home/ssa/capo/:/root/.capo
secrets:
- source: dsoc_dev_secrets
target: dsoc-dev.properties
environment:
CAPO_PATH: /run/secrets
CAPO_PROFILE: dsoc-dev
deploy:
placement:
constraints:
......@@ -24,13 +28,64 @@ services:
parallelism: 0
order: stop-first
capability:
image: marconi.aoc.nrao.edu/workspaces/capability:${TAG_TO_DEPLOY}
ports:
- "3457:3457"
volumes:
- /home/ssa/capo/:/root/.capo
secrets:
- source: dsoc_dev_secrets
target: dsoc-dev.properties
environment:
CAPO_PATH: /run/secrets
CAPO_PROFILE: dsoc-dev
deploy:
placement:
constraints:
- "node.labels.node_env==${SWARM_NODE_ENV}"
restart_policy:
condition: on-failure
max_attempts: 3
window: 5s
update_config:
parallelism: 2
delay: 5s
order: stop-first
failure_action: rollback
rollback_config:
parallelism: 0
order: stop-first
notification:
image: marconi.aoc.nrao.edu/workspaces/notification:${TAG_TO_DEPLOY}
ports:
- "3458:3458"
secrets:
- source: dsoc_dev_secrets
target: dsoc-dev.properties
environment:
CAPO_PATH: /run/secrets
CAPO_PROFILE: dsoc-dev
deploy:
placement:
constraints:
- "node.labels.node_env==${SWARM_NODE_ENV}"
restart_policy:
condition: on-failure
max_attempts: 3
window: 5s
update_config:
parallelism: 2
delay: 5s
order: stop-first
failure_action: rollback
rollback_config:
parallelism: 0
order: stop-first
web:
image: marconi.aoc.nrao.edu/workspaces/web:${TAG_TO_DEPLOY}
ports:
- "4444:80"
deploy:
placement:
constraints:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment