Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12cdfc32 authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Recover the rsync in entrypoint 'hack'

parent cd6cda19
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ default:
    - docker build --pull -t "$CI_REGISTRY_IMAGE/jekyll:$IMAGE_TAG" -f Dockerfile.jekyll htdocs
    - docker push "$CI_REGISTRY_IMAGE/jekyll:$IMAGE_TAG"

    - docker build --pull -t "$CI_REGISTRY_IMAGE/nginx:$IMAGE_TAG" -f Dockerfile.nginx htdocs
    - docker push "$CI_REGISTRY_IMAGE/nginx:$IMAGE_TAG"

deep-build:branch:
  extends: .deep-build:docker
  rules:
@@ -76,6 +79,11 @@ jekyll_container_scanner:
  variables:
    DOCKER_IMAGE: $CI_REGISTRY_IMAGE/jekyll:$CI_COMMIT_REF_SLUG

nginx_container_scanner:
  extends: container_scanning
  variables:
    DOCKER_IMAGE: $CI_REGISTRY_IMAGE/nginx:$CI_COMMIT_REF_SLUG

# Deploy stage
.deploy:compose:
  stage: deploy
+3 −5
Original line number Diff line number Diff line
@@ -9,9 +9,7 @@ RUN jekyll build -d /tmp/e_docs_website && rm /tmp/Gemfile*
#FROM ubuntu:22.04 AS ubuntu
#COPY --from=jekyll /tmp/e_docs_website/ /tmp/e_docs_website/
#RUN apt-get update && apt-get install minify -y
#RUN minify -r -o /tmp/e_docs_website_minified/assets/ /tmp/e_docs_website/assets/
#RUN minify -r -o /tmp/e_docs_website/ /tmp/e_docs_website/

FROM nginx:stable
COPY ./config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./config/nginx/conf.d /etc/nginx/conf.d
COPY --chown=www-data:www-data --from=jekyll /tmp/e_docs_website/ /usr/share/nginx/html/
FROM registry.gitlab.e.foundation/e/documentation/user/nginx:$IMAGE_TAG
COPY --chown=www-data:www-data --from=jekyll /tmp/e_docs_website/ /tmp/e_docs_website/

Dockerfile.nginx

0 → 100644
+12 −0
Original line number Diff line number Diff line
FROM nginx:stable
LABEL maintainer="dev@murena.io"
RUN apt-get -y update
RUN apt-get -y install rsync

COPY ./config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./config/nginx/conf.d /etc/nginx/conf.d

COPY ./entrypoint.sh ./entrypoint.sh
RUN chmod +x entrypoint.sh

ENTRYPOINT [ "./entrypoint.sh" ]

htdocs/entrypoint.sh

0 → 100644
+3 −0
Original line number Diff line number Diff line
#!/bin/bash
rsync -rlDog --delete --exclude .gitignore /tmp/e_docs_website/ /usr/share/nginx/html/
nginx -g "daemon off;"
 No newline at end of file