diff --git a/compose.dev.yml b/compose.dev.yml new file mode 100755 index 0000000..cadd4a9 --- /dev/null +++ b/compose.dev.yml @@ -0,0 +1,22 @@ +services: + verdaccio-dev: + extends: + file: compose.base.yml + service: verdaccio + develop: + watch: + - action: rebuild + path: ./files + target: /verdaccio + # ports: + # - ${HOST_PORT:-4873}:4873 + volumes: + - ${CONF_DEV:-./mounts/live/conf}:/verdaccio/conf:ro + - ${STORAGE_DEV:-${STORAGE:-./mounts/dev/storage}}:/verdaccio/storage + - ${LOGS_DEV:-./mounts/dev/logs}:/verdaccio/logs + # - ${CERTS_DEV:-${CERTS:-./mounts/dev/certs}}:/verdaccio/certs:ro + environment: + - DOMAIN=${DOMAIN_DEV:-${DOMAIN:?}} + - HOST_PORT=${HOST_PORT_DEV:-${HOST_PORT:-4873}} + - PROXY_PORT=${PROXY_PORT:-${PORT_DEV:-${HOST_PORT:-4873}}} + - VIRTUAL_HOST=${DOMAIN_DEV:-${DOMAIN:?}} \ No newline at end of file diff --git a/compose.yml b/compose.yml index affa05d..cb3b824 100755 --- a/compose.yml +++ b/compose.yml @@ -15,34 +15,27 @@ services: - DOMAIN=${DOMAIN:?} - HOST_PORT=${HOST_PORT:-4873} - PROXY_PORT=${PROXY_PORT:-${HOST_PORT:-4873}} - - VIRTUAL_HOST=${DOMAIN:?} + - VIRTUAL_HOST=${DOMAIN:?} verdaccio-dev: extends: - file: compose.base.yml - service: verdaccio - profiles: - - dev + file: compose.dev.yml + service: verdaccio-dev image: jackdeaniels/private:verdaccio-dev container_name: verdaccio-dev - develop: - watch: - - action: rebuild - path: ./files - target: /verdaccio - # ports: - # - ${HOST_PORT:-4873}:4873 - volumes: - - ${CONF_DEV:-./mounts/live/conf}:/verdaccio/conf:ro - - ${STORAGE_DEV:-${STORAGE:-./mounts/dev/storage}}:/verdaccio/storage - - ${LOGS_DEV:-./mounts/dev/logs}:/verdaccio/logs - # - ${CERTS_DEV:-${CERTS:-./mounts/dev/certs}}:/verdaccio/certs:ro - environment: - - DOMAIN=${DOMAIN_DEV:-${DOMAIN:?}} - - HOST_PORT=${HOST_PORT_DEV:-${HOST_PORT:-4873}} - - PROXY_PORT=${PROXY_PORT:-${PORT_DEV:-${HOST_PORT:-4873}}} - - VIRTUAL_HOST=${DOMAIN_DEV:-${DOMAIN:?}} + profiles: + - dev + verdaccio-beta: + extends: + file: compose.dev.yml + service: verdaccio-dev + image: jackdeaniels/private:verdaccio-beta + container_name: verdaccio-beta + profiles: + - beta + build: + dockerfile: dockerfile.beta # Old configuration - Uses nginx-v1 diff --git a/dockerfile.beta b/dockerfile.beta new file mode 100755 index 0000000..09ab1f9 --- /dev/null +++ b/dockerfile.beta @@ -0,0 +1,19 @@ +FROM verdaccio/verdaccio:6.0.0-beta.2 +EXPOSE 4873 + +# Get curl for healthcheck +USER root +RUN apk update && apk add curl + +# Copy scripts into container +COPY --chown=root:root files/scripts/* /verdaccio/scripts/ +# Script execution permissions +RUN chmod u+x /verdaccio/scripts/* + +# Switch user +# USER $VERDACCIO_USER_UID +# USER verdaccio +# ^ Both these options crash the container on startup, exit code 2, no logs, no errors + +HEALTHCHECK --interval=30s --timeout=3s \ + CMD /verdaccio/scripts/healthcheck.sh \ No newline at end of file