diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9be12f1..dd4f012 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,8 +32,9 @@ build-test-job: stage: deploy before_script: - sudo docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD $CI_REGISTRY + - sudo docker pull $IMAGE_NAME:$IMAGE_TAG script: - - sudo docker cp $IMAGE_NAME:$IMAGE_TAG:/opt/site /home/toren332/sst_postamates_frontend/dist + - sudo docker cp $IMAGE_NAME:$IMAGE_TAG:/dist /home/toren332/sst_postamates_frontend/dist tags: - deploy-remote @@ -43,12 +44,3 @@ deploy-test-job: IMAGE_TAG: $CI_COMMIT_SHORT_SHA rules: - if: $CI_COMMIT_BRANCH == "sst_main" - -# deploy: -# stage: deploy -# script: -# - sudo cp -R ./dist /home/toren332/sst_postamates_frontend -# tags: -# - deploy-remote -# rules: -# - if: $CI_COMMIT_BRANCH == "sst_main" diff --git a/Dockerfile b/Dockerfile index 64b1e28..7539e1e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,4 @@ ARG REACT_APP_DOMAIN_URL=https://${DOMAIN}/ RUN yarn build FROM nginx:1.23-alpine -COPY --from=builder /usr/src/postamates_frontend/dist /opt/site -COPY nginx.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY --from=builder /usr/src/postamates_frontend/dist /dist diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index d1f3158..0000000 --- a/nginx.conf +++ /dev/null @@ -1,25 +0,0 @@ -worker_processes auto; - -events { - worker_connections 8000; - multi_accept on; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - server { - listen 80; - listen [::]:80 default ipv6only=on; - - charset UTF-8; - client_max_body_size 200M; - - root /opt/site; - - location / { - try_files $uri $uri/ /index.html; - } - } -} \ No newline at end of file