Skip to content
Snippets Groups Projects
Commit 8bdf9243 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Public as mount volume

parent 557e40bb
No related branches found
No related tags found
1 merge request!209Public as mount volume
...@@ -145,7 +145,7 @@ deploy:meilisearch:prod: ...@@ -145,7 +145,7 @@ deploy:meilisearch:prod:
url: "https://${MEILI_HOST_PROD}" url: "https://${MEILI_HOST_PROD}"
############### DELETE RELEASE
delete-meili-helm-release: delete-meili-helm-release:
rules: rules:
...@@ -478,15 +478,15 @@ build:prod:wiki: ...@@ -478,15 +478,15 @@ build:prod:wiki:
- echo "Wiki pod is ready" - 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}') - WIKI_POD=$(kubectl --namespace ${KUBE_NAMESPACE} get pods -l "app.kubernetes.io/name=df-wiki" --output jsonpath='{.items[0].metadata.name}')
- echo ${WIKI_POD} - echo ${WIKI_POD}
- kubectl --namespace ${KUBE_NAMESPACE} cp scripts/copy-structure-data.sh ${WIKI_POD}:/structure-data/sanitized-dump # - 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} exec ${WIKI_POD} -- rsync -avz /public-website/ /usr/share/nginx/html/
deploy:dev: deploy:dev:
extends: .deploy extends: .deploy
rules: rules:
- if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "foldseek-pages" - if: $CI_COMMIT_BRANCH == "dev" || $CI_COMMIT_BRANCH == "public-as-mount-volume"
needs: needs:
- "build:dev:wiki" - "build:dev:wiki"
when: manual when: manual
......
...@@ -91,9 +91,13 @@ RUN npm run generate ...@@ -91,9 +91,13 @@ RUN npm run generate
FROM nginx:1.25-bookworm FROM nginx:1.25-bookworm
# RUN rm -rf /usr/share/nginx/html/* # RUN rm -rf /usr/share/nginx/html/*
RUN apt update -y && apt install rsync -y 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 COPY nginx.conf /etc/nginx/nginx.conf
RUN chown nginx:nginx /usr/share/nginx/html RUN chown nginx:nginx /usr/share/nginx/html
COPY --chown=nginx:nginx --from=generate /usr/src/app/.output/public /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/ # RUN chmod -R nginx:nginx /usr/share/nginx/html/
USER nginx USER nginx
COPY --chown=nginx:nginx --from=generate /usr/src/app/.output/public /public-website
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
...@@ -39,14 +39,14 @@ spec: ...@@ -39,14 +39,14 @@ spec:
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: {{ .Values.service.port }}
protocol: TCP protocol: TCP
# livenessProbe: livenessProbe:
# httpGet: httpGet:
# path: / path: /wiki/
# port: http port: http
# readinessProbe: readinessProbe:
# httpGet: httpGet:
# path: / path: /wiki/
# port: http port: http
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
...@@ -55,7 +55,7 @@ spec: ...@@ -55,7 +55,7 @@ spec:
- name: nginx-config - name: nginx-config
mountPath: /etc/nginx/conf.d/ mountPath: /etc/nginx/conf.d/
- name: structure-data-pvc - name: structure-data-pvc
mountPath: /structure-data mountPath: /usr/share/nginx/html
- name: website-pvc - name: website-pvc
mountPath: /website mountPath: /website
......
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