Merge branch 'develop' into develop
This commit is contained in:
+6
-4
@@ -39,15 +39,17 @@ EXPOSE 80 81 443
|
||||
|
||||
COPY backend /app
|
||||
COPY frontend/dist /app/frontend
|
||||
COPY docker/rootfs /
|
||||
|
||||
# Copy test CA cert for use in container and add to trusted certs from a self-signed CA
|
||||
COPY --from=testca /home/step/certs/root_ca.crt /etc/ssl/certs/NginxProxyManager.crt
|
||||
WORKDIR /etc/ssl/certs
|
||||
RUN ln -s NginxProxyManager.crt 1d0e3f10.0 && update-ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
RUN yarn install \
|
||||
&& yarn cache clean
|
||||
|
||||
# add late to limit cache-busting by modifications
|
||||
COPY docker/rootfs /
|
||||
COPY --from=testca /home/step/certs/root_ca.crt /etc/ssl/certs/NginxProxyManager.crt
|
||||
|
||||
# Remove frontend service not required for prod, dev nginx config as well
|
||||
RUN rm -rf /etc/s6-overlay/s6-rc.d/user/contents.d/frontend /etc/nginx/conf.d/dev.conf \
|
||||
&& chmod 644 /etc/logrotate.d/nginx-proxy-manager
|
||||
|
||||
@@ -20,10 +20,10 @@ RUN echo "fs.file-max = 65535" > /etc/sysctl.conf \
|
||||
|
||||
# Task
|
||||
WORKDIR /usr
|
||||
RUN curl -sL https://taskfile.dev/install.sh | sh
|
||||
WORKDIR /root
|
||||
RUN curl -sL 'https://taskfile.dev/install.sh' | sh
|
||||
|
||||
COPY rootfs /
|
||||
|
||||
COPY scripts/install-s6 /tmp/install-s6
|
||||
RUN rm -f /etc/nginx/conf.d/production.conf \
|
||||
&& chmod 644 /etc/logrotate.d/nginx-proxy-manager \
|
||||
@@ -31,8 +31,12 @@ RUN rm -f /etc/nginx/conf.d/production.conf \
|
||||
&& rm -f /tmp/install-s6 \
|
||||
&& chmod 644 -R /root/.cache
|
||||
|
||||
# Certs for testing purposes
|
||||
# Copy test CA cert for use in container and add to trusted certs from a self-signed CA
|
||||
COPY --from=testca /home/step/certs/root_ca.crt /etc/ssl/certs/NginxProxyManager.crt
|
||||
WORKDIR /etc/ssl/certs
|
||||
RUN ln -s NginxProxyManager.crt 1d0e3f10.0 && update-ca-certificates
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
EXPOSE 80 81 443
|
||||
ENTRYPOINT [ "/init" ]
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
|
||||
services:
|
||||
cypress:
|
||||
environment:
|
||||
CYPRESS_stack: "sqlite"
|
||||
command: cypress run --browser chrome --config-file=cypress/config/ci.mjs --expose grepTags="@isolated"
|
||||
|
||||
fullstack:
|
||||
environment:
|
||||
DB_SQLITE_FILE: "/data/mydb.sqlite"
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
DISABLE_IPV6: "true"
|
||||
@@ -1,9 +1,12 @@
|
||||
# WARNING: This is a CI docker-compose file used for building and testing of the entire app, it should not be used for production.
|
||||
services:
|
||||
cypress:
|
||||
environment:
|
||||
CYPRESS_stack: "sqlite"
|
||||
|
||||
fullstack:
|
||||
environment:
|
||||
DB_SQLITE_FILE: '/data/mydb.sqlite'
|
||||
DB_SQLITE_FILE: "/data/mydb.sqlite"
|
||||
PUID: 1000
|
||||
PGID: 1000
|
||||
DISABLE_IPV6: 'true'
|
||||
DISABLE_IPV6: "true"
|
||||
|
||||
@@ -39,7 +39,7 @@ services:
|
||||
- website3.example.com
|
||||
|
||||
stepca:
|
||||
image: jc21/testca
|
||||
image: nginxproxymanager/testca
|
||||
volumes:
|
||||
- "./dev/resolv.conf:/etc/resolv.conf:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
@@ -109,7 +109,7 @@ services:
|
||||
- "cypress_logs:/test/results"
|
||||
- "./dev/resolv.conf:/etc/resolv.conf:ro"
|
||||
- "/etc/localtime:/etc/localtime:ro"
|
||||
command: cypress run --browser chrome --config-file=cypress/config/ci.mjs
|
||||
command: cypress run --browser chrome --config-file=cypress/config/ci.mjs --expose grepTags="-@isolated"
|
||||
networks:
|
||||
- fulltest
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ services:
|
||||
- pgdb.internal
|
||||
|
||||
stepca:
|
||||
image: jc21/testca
|
||||
image: nginxproxymanager/testca
|
||||
container_name: npm2dev.stepca
|
||||
volumes:
|
||||
- "./dev/resolv.conf:/etc/resolv.conf:ro"
|
||||
|
||||
@@ -11,11 +11,11 @@ log_info 'Starting backend ...'
|
||||
|
||||
if [ "${DEVELOPMENT:-}" = 'true' ]; then
|
||||
s6-setuidgid "$PUID:$PGID" yarn install
|
||||
exec s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js"
|
||||
exec s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;export CERTBOT_VERSION=$CERTBOT_VERSION;node --max_old_space_size=250 --abort_on_uncaught_exception node_modules/nodemon/bin/nodemon.js"
|
||||
else
|
||||
while :
|
||||
do
|
||||
s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;node --abort_on_uncaught_exception --max_old_space_size=250 index.js"
|
||||
s6-setuidgid "$PUID:$PGID" bash -c "export HOME=$NPMHOME;export CERTBOT_VERSION=$CERTBOT_VERSION;node --abort_on_uncaught_exception --max_old_space_size=250 index.js"
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -21,6 +21,10 @@ NPMGROUP=npm
|
||||
NPMHOME=/tmp/npmuserhome
|
||||
export NPMUSER NPMGROUP NPMHOME
|
||||
|
||||
# Query the certbot version just once and use it elsewhere
|
||||
CERTBOT_VERSION="$(certbot --version | grep -Eo '[0-9](\.[0-9]+)+')"
|
||||
export CERTBOT_VERSION
|
||||
|
||||
if [[ "$PUID" -ne '0' ]] && [ "$PGID" = '0' ]; then
|
||||
# set group id to same as user id,
|
||||
# the user probably forgot to specify the group id and
|
||||
|
||||
Reference in New Issue
Block a user