diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10709c69636589ae9baf91e15eb11bae2566ddb4..0c2205e49335079feb61abb6ce37da576c40a9a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -145,7 +145,7 @@ deploy:meilisearch:prod: url: "https://${MEILI_HOST_PROD}" - +############### DELETE RELEASE delete-meili-helm-release: rules: @@ -478,15 +478,15 @@ build:prod:wiki: - echo "Wiki pod is ready" - WIKI_POD=$(kubectl --namespace ${KUBE_NAMESPACE} get pods -l "app.kubernetes.io/name=df-wiki" --output jsonpath='{.items[0].metadata.name}') - echo ${WIKI_POD} - - kubectl --namespace ${KUBE_NAMESPACE} cp scripts/copy-structure-data.sh ${WIKI_POD}:/structure-data/sanitized-dump - - kubectl --namespace ${KUBE_NAMESPACE} exec ${WIKI_POD} -- bash -c 'cd /structure-data/sanitized-dump && bash copy-structure-data.sh' + # - kubectl --namespace ${KUBE_NAMESPACE} cp scripts/copy-structure-data.sh ${WIKI_POD}:/structure-data/sanitized-dump + - kubectl --namespace ${KUBE_NAMESPACE} exec ${WIKI_POD} -- rsync -avz /public-website/ /usr/share/nginx/html/ deploy:dev: extends: .deploy rules: - - if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "foldseek-pages" + - if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "public-as-mount-volume" needs: - "build:dev:wiki" when: manual diff --git a/Dockerfile b/Dockerfile index dee820499c136298a343b0c590235daa9004312b..32a5fedf31fec0bcd6ff9981ec23fd5b78e8d6a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,9 +91,13 @@ RUN npm run generate FROM nginx:1.25-bookworm # RUN rm -rf /usr/share/nginx/html/* RUN apt update -y && apt install rsync -y +RUN mkdir /public-website +RUN chown nginx:nginx /public-website COPY nginx.conf /etc/nginx/nginx.conf RUN chown nginx:nginx /usr/share/nginx/html COPY --chown=nginx:nginx --from=generate /usr/src/app/.output/public /usr/share/nginx/html + # RUN chmod -R nginx:nginx /usr/share/nginx/html/ USER nginx +COPY --chown=nginx:nginx --from=generate /usr/src/app/.output/public /public-website CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/deploy/df-wiki/templates/deployment.yaml b/deploy/df-wiki/templates/deployment.yaml index 8a362cad8a72b65dfe00b6f95f9772857141c70b..fbb5031e1d9fa1777e2766b292edf0547643f0a5 100644 --- a/deploy/df-wiki/templates/deployment.yaml +++ b/deploy/df-wiki/templates/deployment.yaml @@ -39,14 +39,14 @@ spec: - name: http containerPort: {{ .Values.service.port }} protocol: TCP - # livenessProbe: - # httpGet: - # path: / - # port: http - # readinessProbe: - # httpGet: - # path: / - # port: http + livenessProbe: + httpGet: + path: /wiki/ + port: http + readinessProbe: + httpGet: + path: /wiki/ + port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: @@ -55,7 +55,7 @@ spec: - name: nginx-config mountPath: /etc/nginx/conf.d/ - name: structure-data-pvc - mountPath: /structure-data + mountPath: /usr/share/nginx/html - name: website-pvc mountPath: /website