diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3a7b8402cfc225aa4a8434065d36a6d20282b139 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,38 @@ +# Dockerfile + +FROM nginx:latest + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y certbot curl tar && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get clean + +ARG GINKGO_WEB_VERSION=0.0.9 +ARG GINKGO_WEB_VERSION_PATH=176d988bc6e5c3756973cef2038c7d6c + +RUN curl -L https://git.duniter.org/vjrj/ginkgo/uploads/${GINKGO_WEB_VERSION_PATH}/ginkgo-web-${GINKGO_WEB_VERSION}.tgz | tar xfz - -C /usr/share/nginx/html/ --strip-components=2 + +COPY nginx.conf.template /etc/nginx/nginx.conf.template + +RUN mkdir -p /etc/nginx/snippets && \ + touch /etc/nginx/snippets/proxy-gva.conf && \ + chmod 644 /etc/nginx/snippets/proxy-gva.conf + +COPY proxy-gva.conf /etc/nginx/snippets/proxy-gva.conf + +# Configuration of g1nkgo +COPY assets/env.production.txt /usr/share/nginx/html/assets/env.production.txt +COPY assets/img/ /usr/share/nginx/html/assets/img/ + +# Copy the default nginx configuration and g1nkgo conf to restore in empty volumes +RUN cp -a /etc/nginx/ /etc/nginx-default/ + +# Copy startup.sh (copy previous assets if people mount empty volumes) +COPY startup.sh /usr/local/bin/startup.sh +RUN chmod +x /usr/local/bin/startup.sh + +# Exponer los puertos de nginx +EXPOSE 80 +EXPOSE 443 + +CMD ["nginx", "-g", "daemon off;"]