diff --git a/build/nginx/Dockerfile b/build/nginx/Dockerfile index 9d4b9f7..5713afe 100644 --- a/build/nginx/Dockerfile +++ b/build/nginx/Dockerfile @@ -74,7 +74,7 @@ RUN mkdir -p ${WORKDIR} ${PHP_FPM_LISTEN_DIR} ${LOG_DIR} # change ownership of folders to the user RUN chown -R ${USER_ID}:${GROUP_ID} ${WORKDIR} ${PHP_FPM_LISTEN_DIR} ${LOG_DIR} -# set tue workdir +# set the workdir WORKDIR ${WORKDIR} # copy the application @@ -104,5 +104,6 @@ VOLUME [ "/app/Backend/database/sqlite" ] # define the exposed port EXPOSE 9000 -# start the app -CMD ["/usr/bin/supervisord"] +# setting the command +# CMD ["/usr/bin/supervisord"] +ENTRYPOINT ["/usr/bin/supervisord"] diff --git a/build/nginx/build.sh b/build/nginx/build.sh index 6c6478c..d5e54a5 100755 --- a/build/nginx/build.sh +++ b/build/nginx/build.sh @@ -1,12 +1,16 @@ #!/bin/bash -PACKAGE_REPOSITORY=gitea.goliath.hu/packages/discord-bot-goliath-backend +echo This is a sample build script, if the workflow cannot be used. +echo Please customize the repository address/name for your own. + + +PACKAGE_REPOSITORY=proxima.goliath.hu/proxima/backend BUILD_TAG=nginx -PACKAGE_TAG=nginx +UID=$(id -u) +GID=$(id -g) # --------------------------------------------------------------------------- -echo Building "${BUILD_TAG}" package with "${PACKAGE_TAG}" tag... - +echo Building "${BUILD_TAG}" package .. echo # --------------------------------------------------------------------------- @@ -27,20 +31,21 @@ echo Determining tag name... branch=$(git branch --show-current) tag=${PACKAGE_TAG:-temp} -#[[ $branch == dev ]] && tag=testing -#[[ $branch == master ]] && tag=latest -#[[ $branch == features/nginx-server ]] && tag=nginx-joint +[[ $branch == dev ]] && tag=testing +[[ $branch == main ]] && tag=latest +[[ $branch == master ]] && tag=latest # --------------------------------------------------------------------------- echo Building image... -docker build \ +docker build . \ --tag ${PACKAGE_REPOSITORY}:$tag \ - --build-arg GROUP_ID=$(id -g) \ - --build-arg USER_ID=$(id -u) \ + --build-arg GROUP_ID=${GID} \ + --build-arg USER_ID=${UID} \ --file build/${BUILD_TAG}/Dockerfile \ - . -# --progress=plain \ + --platform linux/amd64,linux/arm64 \ + --provenance=false \ + --sbom=false \ # --push \ # ---------------------------------------------------------------------------