From 11175aaa5f8122ef8a5bec13bd2f2becfd0d087f Mon Sep 17 00:00:00 2001 From: ahgraber Date: Sun, 7 Feb 2021 09:52:37 -0500 Subject: [PATCH] revert docker/dev before PR --- docker/dev/Dockerfile | 28 +++++++++---------- docker/dev/docker-compose.yaml | 51 ---------------------------------- 2 files changed, 13 insertions(+), 66 deletions(-) delete mode 100644 docker/dev/docker-compose.yaml diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index cad4bc7b..1e4bdad8 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -1,9 +1,9 @@ FROM jc21/alpine-nginx-full:node LABEL maintainer="Jamie Curnow " +ENV S6_LOGGING=0 ENV SUPPRESS_NO_CONFIG_WARNING=1 ENV S6_FIX_ATTRS_HIDDEN=1 -ENV NODE_ENV=production RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \ && apk update \ @@ -11,24 +11,22 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \ && python3 -m ensurepip \ && rm -rf /var/cache/apk/* +# Task +RUN cd /usr \ + && curl -sL https://taskfile.dev/install.sh | sh \ + && cd /root + +COPY rootfs / +RUN rm -f /etc/nginx/conf.d/production.conf + # s6 overlay -COPY scripts/install-s6 /tmp/install-s6 -RUN /tmp/install-s6 "${TARGETPLATFORM}" && rm -f /tmp/install-s6 +RUN curl -L -o /tmp/s6-overlay-amd64.tar.gz "https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-amd64.tar.gz" \ + && tar -xzf /tmp/s6-overlay-amd64.tar.gz -C / EXPOSE 80 EXPOSE 81 EXPOSE 443 -COPY docker/rootfs / -ADD backend /app -ADD frontend/dist /app/frontend -COPY global /app/global +ENTRYPOINT [ "/init" ] -WORKDIR /app -RUN yarn install - -# Remove frontend service not required for prod, dev nginx config as well -RUN rm -rf /etc/services.d/frontend RUN rm -f /etc/nginx/conf.d/dev.conf - -VOLUME [ "/data", "/etc/letsencrypt" ] -ENTRYPOINT [ "/init" ] \ No newline at end of file +HEALTHCHECK --interval=5s --timeout=3s CMD /bin/check-health \ No newline at end of file diff --git a/docker/dev/docker-compose.yaml b/docker/dev/docker-compose.yaml deleted file mode 100644 index 35871966..00000000 --- a/docker/dev/docker-compose.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# docker-compose.yml -# RUN: ```docker-compose --env-file``` -version: "3.7" - -# secrets: -# # paths assume the .secrets folder is sibling depth to folder where docker-compose resides -# DB_ROOT_PWD: -# file: ../../../homelab-setup/docker_secrets/db_root_pwd.txt -# MYSQL_PWD: -# file: ../../../homelab-setup/docker_secrets/mysql_pwd.txt - -services: - # mariadb: - # image: mariadb:test - # container_name: mariadb - # secrets: - # - DB_ROOT_PWD - # - MYSQL_PWD - # environment: - # # MYSQL_ROOT_PASSWORD: "npm" - # MYSQL_ROOT_PASSWORD__FILE: /run/secrets/DB_ROOT_PWD - # MYSQL_DATABASE: "npm" - # MYSQL_USER: "npm" - # # MYSQL_PASSWORD: "npm" - # MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD - # volumes: - # - ./data/mysql:/var/lib/mysql - - npm: - build: - context: ../../ - dockerfile: ./docker/dev/Dockerfile - # args: - # TARGETPLATFORM: arm64v8 - image: npm:test # provide a name and tag for the image - container_name: npm - # secrets: - # - MYSQL_PWD - # environment: - # DISABLE_IPV6: 'true' - # DB_MYSQL_HOST: "mariadb" - # DB_MYSQL_PORT: 3306 - # MYSQL_DATABASE: "npm" - # MYSQL_USER: "npm" - # # MYSQL_PASSWORD: "npm" - # MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD - # volumes: - # - ./data/npm:/data - # - ./data/letsencrypt:/etc/letsencrypt - # depends_on: - # - mariadb \ No newline at end of file