diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a749119..2355dbd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,16 @@ build-app: deploy-to-staging: extends: .deploy_template + rules: + - if: "$CI_COMMIT_BRANCH == $STAGING_BRANCH" tags: - front - staging +deploy-to-prod: + extends: .deploy_template + rules: + - if: "$CI_COMMIT_BRANCH == $PRODUCTION_BRANCH" + tags: + - front + - prod diff --git a/Dockerfile b/Dockerfile index ac65e91..6426786 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,5 @@ RUN yarn build FROM nginx:latest as result WORKDIR /usr/share/nginx/html COPY --from=build /usr/app/dist/ /usr/share/nginx/html +COPY pub.js /usr/share/nginx/html/export/pub.js COPY hub.conf /etc/nginx/conf.d/default.conf diff --git a/deployments/main/docker-compose.yaml b/deployments/main/docker-compose.yaml new file mode 100644 index 0000000..8dacb5e --- /dev/null +++ b/deployments/main/docker-compose.yaml @@ -0,0 +1,8 @@ +services: + respondent: + container_name: respondent + restart: unless-stopped + image: $CI_REGISTRY_IMAGE/main:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID + hostname: respondent + tty: true + diff --git a/deployments/staging/docker-compose.yaml b/deployments/staging/docker-compose.yaml index 3ab31f2..d258d2e 100644 --- a/deployments/staging/docker-compose.yaml +++ b/deployments/staging/docker-compose.yaml @@ -3,11 +3,6 @@ services: container_name: respondent restart: unless-stopped image: $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID - networks: - - marketplace_penahub_frontend hostname: respondent tty: true -networks: - marketplace_penahub_frontend: - external: true diff --git a/pub.js b/pub.js new file mode 100644 index 0000000..f192725 --- /dev/null +++ b/pub.js @@ -0,0 +1 @@ +console.log("PEHA NUB")