diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index b86c2be8..dee5eb13 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -57,17 +57,17 @@ body: description: Paste the output from the command above. This will be automatically formatted, so no need for backticks. render: shell placeholder: | - com.foundryvtt.version = "13.332" + com.foundryvtt.version = "13.333" org.opencontainers.image.authors = "markf+github@geekpad.com" org.opencontainers.image.created = "2022-09-01T23:22:04.337Z" - org.opencontainers.image.description = "An easy-to-deploy Dockerized Foundry Virtual Tabletop server." + org.opencontainers.image.description = "An easy-to-deploy containerized Foundry Virtual Tabletop server." org.opencontainers.image.licenses = "MIT" org.opencontainers.image.revision = "94d5cc47fc0c5ac5ae268988c6673c046e39e6b6" org.opencontainers.image.source = "https://github.com/felddy/foundryvtt-docker" org.opencontainers.image.title = "foundryvtt-docker" org.opencontainers.image.url = "https://github.com/felddy/foundryvtt-docker" org.opencontainers.image.vendor = "Geekpad" - org.opencontainers.image.version = "13.332.0" + org.opencontainers.image.version = "13.333.0" validations: required: true - type: textarea @@ -78,7 +78,7 @@ body: render: console placeholder: | foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [debug] Timezone set to: US/Eastern - foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Starting felddy/foundryvtt container v13.332.0 + foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Starting felddy/foundryvtt container v13.333.0 foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [debug] CONTAINER_VERBOSE set. Debug logging enabled. foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Reading configured secrets from: /run/secrets/config.json foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] No Foundry Virtual Tabletop installation detected. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 5a6d0b9b..049e13a2 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -39,7 +39,7 @@ body: - Right-click on the selected object. - Choose a color from the color change popup menu. - Click on the new purple color selection. - - Notice the object turns a beautifuly shade of purple. + - Notice the object turns a beautiful shade of purple. validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/regression.yml b/.github/ISSUE_TEMPLATE/regression.yml index 96d1e664..d5a31650 100644 --- a/.github/ISSUE_TEMPLATE/regression.yml +++ b/.github/ISSUE_TEMPLATE/regression.yml @@ -72,17 +72,17 @@ body: description: Paste the output from the command above. This will be automatically formatted, so no need for backticks. render: shell placeholder: | - com.foundryvtt.version = "13.332" + com.foundryvtt.version = "13.333" org.opencontainers.image.authors = "markf+github@geekpad.com" org.opencontainers.image.created = "2022-09-01T23:22:04.337Z" - org.opencontainers.image.description = "An easy-to-deploy Dockerized Foundry Virtual Tabletop server." + org.opencontainers.image.description = "An easy-to-deploy containerized Foundry Virtual Tabletop server." org.opencontainers.image.licenses = "MIT" org.opencontainers.image.revision = "94d5cc47fc0c5ac5ae268988c6673c046e39e6b6" org.opencontainers.image.source = "https://github.com/felddy/foundryvtt-docker" org.opencontainers.image.title = "foundryvtt-docker" org.opencontainers.image.url = "https://github.com/felddy/foundryvtt-docker" org.opencontainers.image.vendor = "Geekpad" - org.opencontainers.image.version = "13.332.0" + org.opencontainers.image.version = "13.333.0" validations: required: true - type: textarea @@ -93,7 +93,7 @@ body: render: console placeholder: | foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [debug] Timezone set to: US/Eastern - foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Starting felddy/foundryvtt container v13.332.0 + foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Starting felddy/foundryvtt container v13.333.0 foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [debug] CONTAINER_VERBOSE set. Debug logging enabled. foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] Reading configured secrets from: /run/secrets/config.json foundry_1 | Entrypoint | 2022-02-23 14:14:53 | [info] No Foundry Virtual Tabletop installation detected. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e3d8b17..d442e457 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: block @@ -65,7 +65,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: block @@ -87,7 +87,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: block @@ -112,14 +112,11 @@ jobs: uses: felddy/reusable-workflows/.github/workflows/docker-build-image.yml@v2 with: artifact_name: ${{ needs.config.outputs.image_artifact_name_stem }}-${{ needs.config.outputs.test_platform }} - build_arg_1_name: VERSION cache_from_scopes: ${{ needs.config.outputs.test_platform }} cache_to_scope: ${{ needs.config.outputs.test_platform }} image_archive_name_stem: ${{ needs.config.outputs.test_platform }} image_labels: ${{ needs.metadata.outputs.image_labels }} platforms: ${{ needs.config.outputs.test_platform }} - secrets: - build_arg_1_value: ${{ needs.metadata.outputs.source_version }} build-pre-installed-test-image: name: "Build pre-installed test image" @@ -132,7 +129,6 @@ jobs: uses: felddy/reusable-workflows/.github/workflows/docker-build-image.yml@v2 with: artifact_name: pre-installed-${{ needs.config.outputs.image_artifact_name_stem }}-${{ needs.config.outputs.test_platform }} - build_arg_1_name: VERSION build_secret_1_name: foundry_password build_secret_2_name: foundry_username cache_from_scopes: ${{ needs.config.outputs.test_platform }}-pre-installed @@ -141,7 +137,6 @@ jobs: image_labels: ${{ needs.metadata.outputs.image_labels }} platforms: ${{ needs.config.outputs.test_platform }} secrets: - build_arg_1_value: ${{ needs.metadata.outputs.source_version }} build_secret_1_value: ${{ secrets.FOUNDRY_PASSWORD }} build_secret_2_value: ${{ secrets.FOUNDRY_USERNAME }} image_archive_key: ${{ secrets.ARTIFACT_KEY }} @@ -202,14 +197,11 @@ jobs: uses: felddy/reusable-workflows/.github/workflows/docker-build-image.yml@v2 with: artifact_name: ${{ needs.config.outputs.image_artifact_name_stem }}-${{ matrix.platform }} - build_arg_1_name: VERSION cache_from_scopes: ${{ matrix.platform }} cache_to_scope: ${{ matrix.platform }} image_labels: ${{ needs.metadata.outputs.image_labels }} image_archive_name_stem: ${{ matrix.platform }} platforms: ${{ matrix.platform }} - secrets: - build_arg_1_value: ${{ needs.metadata.outputs.source_version }} generate-sboms: name: "Bill of Materials" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 982a8565..c84c34c1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,7 +44,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: # TODO: change to 'egress-policy: block' after couple of runs egress-policy: audit @@ -54,7 +54,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # tag=codeql-bundle-v3.27.0 + uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # tag=codeql-bundle-v3.27.9 with: languages: ${{ matrix.language }} @@ -62,7 +62,7 @@ jobs: # Java). If this step fails, then you should remove it and run the build # manually (see below). - name: Autobuild - uses: github/codeql-action/autobuild@662472033e021d55d94146f66f6058822b0b39fd # tag=codeql-bundle-v3.27.0 + uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae # tag=codeql-bundle-v3.27.9 # ℹī¸ Command-line programs to run using the OS shell. 📚 # https://git.io/JvXDl @@ -76,4 +76,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # tag=codeql-bundle-v3.27.0 + uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # tag=codeql-bundle-v3.27.9 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 1587b945..6f1839cd 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: # TODO: change to 'egress-policy: block' after couple of runs egress-policy: audit - name: 'Checkout Repository' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 - name: 'Dependency Review' - uses: actions/dependency-review-action@4081bf99e2866ebe428fc0477b69eb4fcda7220a # tag=v4.4.0 + uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # tag=v4.5.0 diff --git a/.github/workflows/docker-pytest-image.yml b/.github/workflows/docker-pytest-image.yml index 4a9474a3..d18bf4e3 100644 --- a/.github/workflows/docker-pytest-image.yml +++ b/.github/workflows/docker-pytest-image.yml @@ -73,7 +73,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: audit # allowed-endpoints: > @@ -115,7 +115,7 @@ jobs: python-version: ${{ inputs.python_version }} - name: Cache testing environments - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag=v4.1.2 + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # tag=v4.2.0 env: BASE_CACHE_KEY: "${{ github.job }}-${{ runner.os }}-\ py${{ steps.setup-python.outputs.python-version }}-" @@ -183,7 +183,7 @@ jobs: - name: Upload unencrypted data artifacts if: ( success() || failure() ) && steps.check_data_archive_key.outputs.do_encryption == 'false' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0 with: name: ${{ inputs.data_artifact_name }} path: data.tar.gz @@ -191,7 +191,7 @@ jobs: - name: Upload encrypted data artifacts if: ( success() || failure() ) && steps.check_data_archive_key.outputs.do_encryption == 'true' - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0 with: name: ${{ inputs.data_artifact_name }} path: data.tar.7z diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 29402f0b..86ec0919 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -52,7 +52,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # tag=v4.4.3 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # tag=v4.5.0 with: name: SARIF file path: results.sarif @@ -60,6 +60,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # tag=codeql-bundle-v3.27.0 + uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # tag=codeql-bundle-v3.27.9 with: sarif_file: results.sarif diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 0170f2dc..5aefe9b9 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index f796b3da..65058913 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # tag=v2.10.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # tag=v2.10.2 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea23554b..986c8f98 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: args: - --fix=lf - id: pretty-format-json - exclude: package-lock.json + exclude: ^(package-lock\.json|\.vscode/settings\.json)$ args: - --autofix - id: requirements-txt-fixer diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..fed3794c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,79 @@ +{ + "cSpell.ignoreRegExpList": [ + "[0-9a-fA-F]{6}\\b" + ], + "cSpell.words": [ + "addoption", + "addopts", + "Autobuild", + "automerge", + "autouse", + "cookiejar", + "docopt", + "docstrings", + "elif", + "endgroup", + "fcqn", + "fhilp", + "firstparty", + "FVTT's", + "Geekpad", + "getfixturevalue", + "getgid", + "getopt", + "getuid", + "ghaction", + "goimports", + "healthcheck", + "ipython", + "isort", + "longoptions", + "LONGOPTS", + "markdownlint", + "mccabe", + "mktemp", + "modifyitems", + "mypy", + "nixpkgs", + "nodeenv", + "noipdiscovery", + "noupdate", + "nullglob", + "octocat", + "opencontainers", + "ossf", + "PASSLIST", + "pathlib", + "pipefail", + "PIXI", + "pycache", + "pycodestyle", + "pydocstyle", + "pyenv", + "pyflakes", + "pypi", + "pytest", + "pytests", + "pythonhosted", + "PYTHONUNBUFFERED", + "pyupgrade", + "Qapla", + "redactions", + "runslow", + "sarif", + "sboms", + "scifi", + "setuptools", + "shellcheck", + "shfmt", + "SHORTOPTS", + "staticcheck", + "stdlib", + "thirdparty", + "tzdata", + "unbuffered", + "venv", + "virtualenv", + "wontfix" + ] +} diff --git a/Dockerfile b/Dockerfile index 4d9e54d3..384244af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ +ARG CONTAINER_VERSION=13.333.0 ARG FOUNDRY_RELEASE_URL -ARG FOUNDRY_VERSION=13.332 +ARG FOUNDRY_VERSION=13.333 ARG NODE_IMAGE_VERSION=20-bookworm-slim -ARG VERSION FROM node:${NODE_IMAGE_VERSION} AS compile-typescript-stage @@ -41,8 +41,6 @@ RUN mkdir dist && touch dist/.placeholder RUN \ --mount=type=secret,id=foundry_username,required=false \ --mount=type=secret,id=foundry_password,required=false \ - echo ">>> username: $(cat /run/secrets/foundry_username)" && \ - echo ">>> password: $(cat /run/secrets/foundry_password)" && \ npm install && \ if [ -f /run/secrets/foundry_username ] && [ -f /run/secrets/foundry_password ]; then \ ./authenticate.js "$(cat /run/secrets/foundry_username)" "$(cat /run/secrets/foundry_password)" cookiejar.json && \ @@ -61,19 +59,18 @@ RUN \ FROM node:${NODE_IMAGE_VERSION} AS final-stage -ARG FOUNDRY_UID=421 +ARG CONTAINER_VERSION ARG FOUNDRY_VERSION ARG TARGETPLATFORM -ARG VERSION LABEL com.foundryvtt.version=${FOUNDRY_VERSION} LABEL org.opencontainers.image.authors="markf+github@geekpad.com" LABEL org.opencontainers.image.vendor="Geekpad" -ENV FOUNDRY_HOME="/home/foundry" ENV FOUNDRY_VERSION=${FOUNDRY_VERSION} +ENV HOME=/home/node -WORKDIR ${FOUNDRY_HOME} +WORKDIR $HOME COPY --from=optional-release-stage /root/dist/ . COPY --from=compile-typescript-stage /root/dist/ . @@ -85,18 +82,17 @@ COPY \ src/launcher.sh \ src/logging.sh \ ./ -RUN addgroup --system --gid ${FOUNDRY_UID} foundry \ - && adduser --system --uid ${FOUNDRY_UID} --ingroup foundry foundry \ +RUN mkdir -p resources /data \ + && chmod a+rwx resources /data \ && apt-get update && apt-get install -y \ curl \ file \ - gosu \ jq \ sed \ tzdata \ unzip \ && rm -rf /var/lib/apt/lists/* \ - && npm install && echo ${VERSION} > image_version.txt + && npm install && echo ${CONTAINER_VERSION} > image_version.txt VOLUME ["/data"] # HTTP Server @@ -107,6 +103,7 @@ EXPOSE 30000/TCP # EXPOSE 33478/UDP # EXPOSE 49152-65535/UDP +USER node ENTRYPOINT ["./entrypoint.sh"] CMD ["resources/app/main.mjs", "--port=30000", "--headless", "--noupdate",\ "--dataPath=/data"] diff --git a/README.md b/README.md index 33936d2b..8f7375b6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ [![CodeQL](https://github.com/felddy/foundryvtt-docker/workflows/CodeQL/badge.svg)](https://github.com/felddy/foundryvtt-docker/actions/workflows/codeql-analysis.yml) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/felddy/foundryvtt-docker/badge)](https://securityscorecards.dev/viewer/?uri=github.com/felddy/foundryvtt-docker) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5966/badge)](https://bestpractices.coreinfrastructure.org/projects/5966) -[![FoundryVTT Release Version: v13.332](https://img.shields.io/badge/release-v13.332-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAA6gAwAEAAAAAQAAAA4AAAAATspU+QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAiFJREFUKBVVks1rE1EUxc+d5tO0prZVSZsUhSBIPyC02ooWurJ0I7rQlRvdC/4N4h9gt7pyoRTswpWgILgQBIOIiC340VhbpC0Ek85MGmPmXc+baWpNGJg77/7uOffeB+z9FHB0FrH9eLwwqpOF0f34KrpsTicW+6L8KE8QhO/n8n1IOgtQHYZA+a/Ai9+Wd6v1g7liq5A2OjKSQNa9hkO4hAzOIylf6CHALk6hoWXsylPkfjyyApaJhVCxmERy5zLSuI7D8h1H5BWht1aBhS6wdI3pN7GabyuyS4JPrchzujmNjDxAVrrRL2PoxRSGxOfjssgEjkkJvVJBWu6h5M7YenvDoOO0OgicD4TPIKWbBG6xvwTaKCMwSU7hKxK6gt8mbsFIMaF5iDyjUg6iPnqc58higCr9fD4iTvWMziAmK2g73f/AADVWX0YXrlChirgOcqL3WXYBYpTfUuxzjkW30dI1C0ZW1RnjMopo4C56MIs6CgQrMER2cJoz9zjdO2iz17g2yZUjqzHWbuA4/ugiEz7DVRe/aLxmcvDQ5Cq+oWGWeDbAgiETXgArrVOFGzR0EkclxrVMcpfLgFThY5roe2yz95ZZkzcbj22+w2VG8Pz6Q/b5Gr6uM9mw04uo6ll4tOlhE8a8xNzGYihCJoT+u3I4kUIp6OM0X9CHHds8frbqsrXlh9CB62nj8L5a9Y4DHR/K68TgcHhoz607Qp34L72X0rdSdM+vAAAAAElFTkSuQmCC)](https://foundryvtt.com/releases/13.332) +[![FoundryVTT Release Version: v13.333](https://img.shields.io/badge/release-v13.333-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAA6gAwAEAAAAAQAAAA4AAAAATspU+QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAiFJREFUKBVVks1rE1EUxc+d5tO0prZVSZsUhSBIPyC02ooWurJ0I7rQlRvdC/4N4h9gt7pyoRTswpWgILgQBIOIiC340VhbpC0Ek85MGmPmXc+baWpNGJg77/7uOffeB+z9FHB0FrH9eLwwqpOF0f34KrpsTicW+6L8KE8QhO/n8n1IOgtQHYZA+a/Ai9+Wd6v1g7liq5A2OjKSQNa9hkO4hAzOIylf6CHALk6hoWXsylPkfjyyApaJhVCxmERy5zLSuI7D8h1H5BWht1aBhS6wdI3pN7GabyuyS4JPrchzujmNjDxAVrrRL2PoxRSGxOfjssgEjkkJvVJBWu6h5M7YenvDoOO0OgicD4TPIKWbBG6xvwTaKCMwSU7hKxK6gt8mbsFIMaF5iDyjUg6iPnqc58higCr9fD4iTvWMziAmK2g73f/AADVWX0YXrlChirgOcqL3WXYBYpTfUuxzjkW30dI1C0ZW1RnjMopo4C56MIs6CgQrMER2cJoz9zjdO2iz17g2yZUjqzHWbuA4/ugiEz7DVRe/aLxmcvDQ5Cq+oWGWeDbAgiETXgArrVOFGzR0EkclxrVMcpfLgFThY5roe2yz95ZZkzcbj22+w2VG8Pz6Q/b5Gr6uM9mw04uo6ll4tOlhE8a8xNzGYihCJoT+u3I4kUIp6OM0X9CHHds8frbqsrXlh9CB62nj8L5a9Y4DHR/K68TgcHhoz607Qp34L72X0rdSdM+vAAAAAElFTkSuQmCC)](https://foundryvtt.com/releases/13.333) [![Docker Pulls](https://img.shields.io/docker/pulls/felddy/foundryvtt)](https://hub.docker.com/r/felddy/foundryvtt) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/felddy/foundryvtt)](https://hub.docker.com/r/felddy/foundryvtt) @@ -43,7 +43,7 @@ docker run \ --env FOUNDRY_PASSWORD='' \ --publish 30000:30000/tcp \ --volume :/data \ - felddy/foundryvtt:release + felddy/foundryvtt:13 ``` > [!TIP] @@ -67,7 +67,7 @@ docker run \ --env FOUNDRY_RELEASE_URL='' \ --publish 30000:30000/tcp \ --volume :/data \ - felddy/foundryvtt:release + felddy/foundryvtt:13 ``` ### Configuration management ### @@ -90,11 +90,9 @@ configuration files, set `CONTAINER_PRESERVE_CONFIG` to `true`. ```yaml --- - version: "3.8" - services: foundry: - image: felddy/foundryvtt:release + image: felddy/foundryvtt:13 hostname: my_foundry_host volumes: - type: bind @@ -146,15 +144,13 @@ uses `secrets.json`. Regardless of the name you choose it must be targeted to ```yaml --- - version: "3.8" - secrets: config_json: file: secrets.json services: foundry: - image: felddy/foundryvtt:release + image: felddy/foundryvtt:13 hostname: my_foundry_host volumes: - type: bind @@ -200,7 +196,7 @@ upgrade to a new version of Foundry pull an updated image version. 1. Pull the new image: ```console - docker pull felddy/foundryvtt:release + docker pull felddy/foundryvtt:13 ``` 1. Follow the previous instructions for [running](#running) the container above. @@ -210,15 +206,20 @@ upgrade to a new version of Foundry pull an updated image version. The images of this container are tagged with [semantic versions](https://semver.org) that align with the [version and build of Foundry Virtual Tabletop](https://foundryvtt.com/article/versioning/) that they support. -It is recommended that most users use the `:release` tag. + +> [!TIP] +> It is recommended that users use the major version tag: `:13` Using the major +> tag will ensure that you receive the most recent version of the software that +> is compatible with your saved data, and prevents inadvertent upgrades to a new +> major version. | Image:tag | Description | |-----------|-------------| -|`felddy/foundryvtt:release` | The most recent image from the `stable` channel. These images are **considered stable**, and well-tested. Most users will use this tag. The `latest` tag always points to the same version as `release`.| -|`felddy/foundryvtt:13.332.0`| An exact image version. | -|`felddy/foundryvtt:13.332`| The most recent image matching the major and minor version numbers. | -|`felddy/foundryvtt:13`| The most recent image matching the major version number. | -|`felddy/foundryvtt:latest`| See the `release` tag. [Why does `latest` == `release`?](https://vsupalov.com/docker-latest-tag/) | +|`felddy/foundryvtt:13`| The most recent image matching the major version number. Most users will use this tag. | +|`felddy/foundryvtt:13.333`| The most recent image matching the major and minor version numbers. | +|`felddy/foundryvtt:13.333.0`| An exact image version. | +|`felddy/foundryvtt:release` | The most recent image from the `stable` channel. These images are **considered stable**, and well-tested. The `latest` tag always points to the same version as `release`.| +|`felddy/foundryvtt:latest`| Same as the `release` tag. [Why does `latest` == `release`?](https://vsupalov.com/docker-latest-tag/) | See the [tags tab](https://hub.docker.com/r/felddy/foundryvtt/tags) on Docker Hub for a list of all the supported tags. @@ -270,12 +271,11 @@ secrets](#using-secrets) instead of environment variables. | Name | Purpose | Default | |-------|---------|---------| -| `CONTAINER_CACHE` | Set a path to cache downloads of the Foundry distribution archive and speed up subsequent container startups. The path should be in `/data` or another persistent mount point in the container. Set to `""` to disable. ***Note***: When the cache is disabled the container may sleep instead of exiting, in certain circumstances, to prevent a download loop. A distribution can be pre-downloaded and placed into a cache directory. The distribution's name must be of the form: `foundryvtt-13.332.zip`| `/data/container_cache` | +| `CONTAINER_CACHE` | Set a path to cache downloads of the Foundry distribution archive and speed up subsequent container startups. The path should be in `/data` or another persistent mount point in the container. Set to `""` to disable. ***Note***: When the cache is disabled the container may sleep instead of exiting, in certain circumstances, to prevent a download loop. A distribution can be pre-downloaded and placed into a cache directory. The distribution's name must be of the form: `foundryvtt-13.333.zip`| `/data/container_cache` | | `CONTAINER_CACHE_SIZE` | Set the maximum number of distribution versions to keep in the cache. The minimum is `1`. When the limit is exceeded, the oldest versions (lowest version numbers) are removed first. Unset to disable cache size management and keep all versions. | | | `CONTAINER_PATCHES` | Set a path to a directory of shell scripts to be sourced after Foundry is installed but before it is started. The path should be in `/data` or another persistent mount point in the container. e.g.; `/data/container_patches` Patch files are sourced in lexicographic order. `CONTAINER_PATCHES` are processed after `CONTAINER_PATCH_URLS`.| | | `CONTAINER_PATCH_URLS` | Set to a space-delimited list of URLs to be sourced after Foundry is installed but before it is started. Patch URLs are sourced in the order specified. `CONTAINER_PATCH_URLS` are processed before `CONTAINER_PATCHES`. ⚠ī¸ **Only use patch URLs from trusted sources!** | | | `CONTAINER_PRESERVE_CONFIG` | Normally new `options.json` and `admin.txt` files are generated by the container at each startup. Setting this to `true` prevents the container from modifying these files when they exist. If they do not exist, they will be created as normal. | `false` | -| `CONTAINER_PRESERVE_OWNER` | Normally the ownership of the `/data` directory and its contents are changed to match that of the server at startup. Setting this to a regular expression will exclude any matching paths and preserve their ownership. *Note: This is a match on the whole path, not a search.* This is useful if you want mount a volume as read-only inside `/data` (e.g.; a volume that contains assets mounted at `/data/Data/assets`). | | | `CONTAINER_URL_FETCH_RETRY` | Number of times to retry fetching the presigned URL using exponential back off. This behavior is useful in continuous integration environments where multiple parallel workflows can exceed the rate-limit of the URL generation service. | `0` | | `CONTAINER_VERBOSE` | Set to `true` to enable verbose logging for the container utility scripts. | `false` | | `FOUNDRY_ADMIN_KEY` | Admin password to be applied at startup. If omitted the admin password will be cleared. May be set [using secrets](#using-secrets). | | @@ -283,7 +283,6 @@ secrets](#using-secrets) instead of environment variables. | `FOUNDRY_COMPRESS_WEBSOCKET` | Set to `true` to enable compression of data sent from the server to the client via websocket. This is recommended for network performance. | `true` | | `FOUNDRY_CSS_THEME` | Choose the CSS theme for the setup page. Choose from `foundry`, `fantasy`, or `scifi`. | `foundry` | | `FOUNDRY_DEMO_CONFIG` | Demo mode allows you to configure a world which will be automatically launched and reset at a frequency of your choosing. When the world is reset, it is deactivated. The source data for the world is restored to its original state using a provided `.zip` file, and the next reset is automatically scheduled. See: [Configuring demo mode](https://foundryvtt.com/article/configuration/#command-line). | | -| `FOUNDRY_GID` | `gid` the daemon will be run under. | `foundry` | | `FOUNDRY_HOSTNAME` | A custom hostname to use in place of the host machine's public IP address when displaying the address of the game session. This allows for reverse proxies or DNS servers to modify the public address. | `null` | | `FOUNDRY_HOT_RELOAD` | Set to `true` to allow packages to hot-reload certain assets, such as CSS, HTML, and localization files without a full refresh. This setting is only recommended for developers. | `false` | | `FOUNDRY_IP_DISCOVERY` | Allow the Foundry server to discover and report the accessibility of the host machine's public IP address and port. Setting this to `false` may reduce server startup time in instances where this discovery would timeout. | `true` | @@ -299,12 +298,11 @@ secrets](#using-secrets) instead of environment variables. | `FOUNDRY_SSL_CERT` | An absolute or relative path that points towards a SSL certificate file which is used jointly with the sslKey option to enable SSL and https connections. If both options are provided, the server will start using HTTPS automatically. | `null` | | `FOUNDRY_SSL_KEY` | An absolute or relative path that points towards a SSL key file which is used jointly with the sslCert option to enable SSL and https connections. If both options are provided, the server will start using HTTPS automatically. | `null` | | `FOUNDRY_TELEMETRY` | Set to `true` to enable FoundryVTT telemetry, `false` to disable. This options allows the collection of anonymous usage data to help improve FoundryVTT. | `null` | -| `FOUNDRY_UID` | `uid` the daemon will be run under. | `foundry` | | `FOUNDRY_UPNP` | Allow Universal Plug and Play to automatically request port forwarding for the Foundry server port to your local network address. | `false` | | `FOUNDRY_UPNP_LEASE_DURATION` | Sets the Universal Plug and Play lease duration, allowing for the possibility of permanent leases for routers which do not support temporary leases. To define an indefinite lease duration set the value to `0`. | `null` | -| `FOUNDRY_VERSION` | Version of Foundry Virtual Tabletop to install. | `13.332` | +| `FOUNDRY_VERSION` | Version of Foundry Virtual Tabletop to install. | `13.333` | | `FOUNDRY_WORLD` | The world to startup at system start. | `null` | -| `TIMEZONE` | Container [TZ database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) | `UTC` | +| `TZ` | Container [TZ database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) | `UTC` | ### Node.js variables ### @@ -337,8 +335,7 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=13.332.0 \ - --tag felddy/foundryvtt:13.332.0 \ + --tag felddy/foundryvtt:13.333.0 \ https://github.com/felddy/foundryvtt-docker.git#develop ``` @@ -361,9 +358,8 @@ Docker: ```console docker buildx build \ --platform linux/amd64 \ - --build-arg VERSION=13.332.0 \ --output type=docker \ - --tag felddy/foundryvtt:13.332.0 . + --tag felddy/foundryvtt:13.333.0 . ``` ## Pre-installed distribution builds ## @@ -384,8 +380,7 @@ build-time instead of start-time. docker build \ --secret id=foundry_username,src=<(echo "") \ --secret id=foundry_password,src=<(echo "") \ - --build-arg VERSION=13.332.0 \ - --tag felddy/foundryvtt:13.332.0 \ + --tag felddy/foundryvtt:13.333.0 \ https://github.com/felddy/foundryvtt-docker.git#develop ``` @@ -398,8 +393,7 @@ docker build \ > docker build \ > --secret id=foundry_username,src=<(jq -r '.foundry_username' path/to/credentials.json) \ > --secret id=foundry_password,src=<(jq -r '.foundry_password' path/to/credentials.json) \ -> --build-arg VERSION=13.332.0 \ -> --tag felddy/foundryvtt:13.332.0 \ +> --tag felddy/foundryvtt:13.333.0 \ > https://github.com/felddy/foundryvtt-docker.git#develop > ``` @@ -411,8 +405,7 @@ documentation](https://docs.docker.com/build/building/secrets/). ```console docker build \ --build-arg FOUNDRY_RELEASE_URL='' \ - --build-arg VERSION=13.332.0 \ - --tag felddy/foundryvtt:13.332.0 \ + --tag felddy/foundryvtt:13.333.0 \ https://github.com/felddy/foundryvtt-docker.git#develop ``` diff --git a/docker-compose.yml b/docker-compose.yml index 0706dd9d..1c632e5d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,8 @@ --- -version: "3.8" - services: foundry: image: felddy/foundryvtt:release hostname: my_foundry_host - restart: "no" volumes: - type: bind source: ./data @@ -31,7 +28,6 @@ services: # "resetSeconds": 3600 # } # - FOUNDRY_COMPRESS_WEBSOCKET=true - # - FOUNDRY_GID=foundry # - FOUNDRY_HOSTNAME= # - FOUNDRY_HOT_RELOAD=false # - FOUNDRY_IP_DISCOVERY= @@ -48,12 +44,10 @@ services: # - FOUNDRY_SSL_CERT= # - FOUNDRY_SSL_KEY= # - FOUNDRY_TELEMETRY= - # - FOUNDRY_UID=foundry # - FOUNDRY_UPNP=false # - FOUNDRY_UPNP_LEASE_DURATION= - # - FOUNDRY_VERSION=13.332 + # - FOUNDRY_VERSION=13.333 # - FOUNDRY_WORLD= - # - TIMEZONE=US/Eastern ports: - target: 30000 published: 30000 diff --git a/package-lock.json b/package-lock.json index fa781573..b7a90cce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,14 +14,14 @@ "fetch-cookie": "^3.0.1", "node-fetch": "^3.3.2", "tough-cookie-file-store": "^2.0.3", - "winston": "^3.16.0" + "winston": "^3.17.0" }, "devDependencies": { "@types/cheerio": "^0.22.35", "@types/docopt": "^0.6.37", "@types/tough-cookie": "^4.0.5", "@types/tough-cookie-file-store": "^2.0.4", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } }, "node_modules/@colors/colors": { @@ -408,9 +408,9 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "node_modules/logform": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", - "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", "dependencies": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", @@ -574,9 +574,9 @@ ] }, "node_modules/safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", "engines": { "node": ">=10" } @@ -655,9 +655,9 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -728,33 +728,33 @@ } }, "node_modules/winston": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.16.0.tgz", - "integrity": "sha512-xz7+cyGN5M+4CmmD4Npq1/4T+UZaz7HaeTlAruFUTjk79CNMq+P6H30vlE4z0qfqJ01VHYQwd7OZo03nYm/+lg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.6.0", + "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.7.0" + "winston-transport": "^4.9.0" }, "engines": { "node": ">= 12.0.0" } }, "node_modules/winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", + "logform": "^2.7.0", + "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" }, "engines": { @@ -1055,9 +1055,9 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "logform": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", - "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", "requires": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", @@ -1164,9 +1164,9 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, "safe-stable-stringify": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", - "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==" }, "safer-buffer": { "version": "2.1.2", @@ -1229,9 +1229,9 @@ "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==" }, "typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true }, "undici": { @@ -1277,30 +1277,30 @@ "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==" }, "winston": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.16.0.tgz", - "integrity": "sha512-xz7+cyGN5M+4CmmD4Npq1/4T+UZaz7HaeTlAruFUTjk79CNMq+P6H30vlE4z0qfqJ01VHYQwd7OZo03nYm/+lg==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", "requires": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.6.0", + "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.7.0" + "winston-transport": "^4.9.0" } }, "winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", "requires": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", + "logform": "^2.7.0", + "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" } } diff --git a/package.json b/package.json index 1737a144..2c61582a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "fetch-cookie": "^3.0.1", "node-fetch": "^3.3.2", "tough-cookie-file-store": "^2.0.3", - "winston": "^3.16.0" + "winston": "^3.17.0" }, "description": "Utilities to help boot a FoundryVTT server.", "devDependencies": { @@ -17,7 +17,7 @@ "@types/docopt": "^0.6.37", "@types/tough-cookie": "^4.0.5", "@types/tough-cookie-file-store": "^2.0.4", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "homepage": "https://github.com/felddy/foundryvtt-docker#readme", "keywords": [ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..866f2fcd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,39 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools", "wheel"] + +[project] +authors = [{ name = "Mark Feldhousen", email = "markf@geekpad.com" }] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Games/Entertainment :: Role-Playing", +] +dependencies = ["semver"] +description = "FoundryVTT Docker Python library" +dynamic = ["version"] +keywords = ["foundryvtt", "virtual tabletop"] +license = { file = "LICENSE" } +name = "foundryvtt-docker" +readme = "README.md" +requires-python = ">=3.10" + +[project.urls] +homepage = "https://github.com/felddy" +issues = "https://github.com/felddy/foundryvtt-docker/issues" +source = "https://github.com/felddy/foundryvtt-docker" + +[project.optional-dependencies] +test = ["coverage", "coveralls", "docker", "pre-commit", "pytest", "pytest-cov"] + +[tool.setuptools.dynamic] +version = { attr = "_version.__version__" } diff --git a/requirements-dev.txt b/requirements-dev.txt index cb516272..1d7e3027 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ --requirement requirements-test.txt ipython +mypy semver diff --git a/requirements-test.txt b/requirements-test.txt index a4af5aa1..1d0a5a44 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1 +1,2 @@ --e .[test] +--editable .[test] +--requirement requirements.txt diff --git a/requirements.txt b/requirements.txt index d6e1198b..8b75fe95 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ --e . +# Note: Add any additional requirements to setup.py's install_requires field +--editable . +wheel diff --git a/setup-env b/setup-env index 09d66700..f0133130 100755 --- a/setup-env +++ b/setup-env @@ -9,69 +9,84 @@ USAGE=$( Configure a development environment for this repository. It does the following: + - Allows the user to specify the Python version to use for the virtual environment. + - Allows the user to specify a name for the virtual environment. - Verifies pyenv and pyenv-virtualenv are installed. - - Creates a Python virtual environment. - - Creates a Node.js virtual environment. - - Configures the activation of the virtual enviroment for the repo directory. - - Installs the requirements needed for development. + - Creates the Python virtual environment. + - Configures the activation of the virtual environment for the repo directory. + - Installs the requirements needed for development (including mypy type stubs). - Installs git pre-commit hooks. - - Configures git upstream remote "lineage" repositories. + - Configures git remotes for upstream "lineage" repositories. Usage: - setup-env [options] [virt_env_name] + setup-env [--venv-name venv_name] [--python-version python_version] setup-env (-h | --help) Options: - -f --force Delete virtual enviroment if it already exists. - -h --help Show this message. - -i --install-hooks Install hook environments for all environments in the - pre-commit config file. + -f | --force Delete virtual environment if it already exists. + -h | --help Show this message. + -i | --install-hooks Install hook environments for all environments in the + pre-commit config file. + -l | --list-versions List available Python versions and select one interactively. + -v | --venv-name Specify the name of the virtual environment. + -p | --python-version Specify the Python version for the virtual environment. END_OF_LINE ) +# Display pyenv's installed Python versions +python_versions() { + pyenv versions --bare --skip-aliases --skip-envs +} + # Flag to force deletion and creation of virtual environment FORCE=0 -# Positional parameters -PARAMS="" +# Initialize the other flags +INSTALL_HOOKS=0 +LIST_VERSIONS=0 +PYTHON_VERSION="" +VENV_NAME="" -# Parse command line arguments -while (("$#")); do - case "$1" in - -f | --force) - FORCE=1 - shift - ;; - -h | --help) - echo "${USAGE}" - exit 0 - ;; - -i | --install-hooks) - INSTALL_HOOKS=1 - shift - ;; - -*) # unsupported flags - echo "Error: Unsupported flag $1" >&2 - exit 1 - ;; - *) # preserve positional arguments - PARAMS="$PARAMS $1" - shift - ;; - esac -done +# Define long options +LONGOPTS="force,help,install-hooks,list-versions,python-version:,venv-name:" + +# Define short options for getopt +SHORTOPTS="fhilp:v:" -# set positional arguments in their proper place -eval set -- "$PARAMS" +# Check for GNU getopt by matching a specific pattern ("getopt from util-linux") +# in its version output. This approach presumes the output format remains stable. +# Be aware that format changes could invalidate this check. +if [[ $(getopt --version 2> /dev/null) != *"getopt from util-linux"* ]]; then + cat << 'END_OF_LINE' + + Please note, this script requires GNU getopt due to its enhanced + functionality and compatibility with certain script features that + are not supported by the POSIX getopt found in some systems, particularly + those with a non-GNU version of getopt. This distinction is crucial + as a system might have a non-GNU version of getopt installed by default, + which could lead to unexpected behavior. + + On macOS, we recommend installing brew (https://brew.sh/). Then installation + is as simple as `brew install gnu-getopt` and adding this to your + profile: + + export PATH="$(brew --prefix)/opt/gnu-getopt/bin:$PATH" + + GNU getopt must be explicitly added to the PATH since it + is keg-only (https://docs.brew.sh/FAQ#what-does-keg-only-mean). + +END_OF_LINE + exit 1 +fi # Check to see if pyenv is installed -if [ -z "$(command -v pyenv)" ] || [ -z "$(command -v pyenv-virtualenv)" ]; then +if [ -z "$(command -v pyenv)" ] || { [ -z "$(command -v pyenv-virtualenv)" ] && [ ! -f "$(pyenv root)/plugins/pyenv-virtualenv/bin/pyenv-virtualenv" ]; }; then echo "pyenv and pyenv-virtualenv are required." if [[ "$OSTYPE" == "darwin"* ]]; then cat << 'END_OF_LINE' - On the Mac, we recommend installing brew, https://brew.sh/. Then installation + On macOS, we recommend installing brew, https://brew.sh/. Then installation is as simple as `brew install pyenv pyenv-virtualenv` and adding this to your profile: @@ -82,7 +97,7 @@ END_OF_LINE fi cat << 'END_OF_LINE' - For Linux, Windows Subsystem for Linux (WSL), or on the Mac (if you don't want + For Linux, Windows Subsystem for Linux (WSL), or macOS (if you don't want to use "brew") you can use https://github.com/pyenv/pyenv-installer to install the necessary tools. Before running this ensure that you have installed the prerequisites for your platform according to the pyenv wiki page, @@ -101,16 +116,88 @@ END_OF_LINE exit 1 fi -set +o nounset +# Use GNU getopt to parse options +if ! PARSED=$(getopt --options $SHORTOPTS --longoptions $LONGOPTS --name "$0" -- "$@"); then + echo "Error parsing options" + exit 1 +fi +eval set -- "$PARSED" + +while true; do + case "$1" in + -f | --force) + FORCE=1 + shift + ;; + -h | --help) + echo "$USAGE" + exit 0 + ;; + -i | --install-hooks) + INSTALL_HOOKS=1 + shift + ;; + -l | --list-versions) + LIST_VERSIONS=1 + shift + ;; + -p | --python-version) + PYTHON_VERSION="$2" + shift 2 + # Check the Python versions being passed in. + if [ -n "${PYTHON_VERSION+x}" ]; then + if python_versions | grep -E "^${PYTHON_VERSION}$" > /dev/null; then + echo Using Python version "$PYTHON_VERSION" + else + echo Error: Python version "$PYTHON_VERSION" is not installed. + echo Installed Python versions are: + python_versions + exit 1 + fi + fi + ;; + -v | --venv-name) + VENV_NAME="$2" + shift 2 + ;; + --) + shift + break + ;; + *) + # Unreachable due to GNU getopt handling all options + echo "Programming error" + exit 64 + ;; + esac +done + # Determine the virtual environment name -if [ "$1" ]; then +if [ -n "$VENV_NAME" ]; then # Use the user-provided environment name - env_name=$1 + env_name="$VENV_NAME" else # Set the environment name to the last part of the working directory. env_name=${PWD##*/} fi -set -o nounset + +# List Python versions and select one interactively. +if [ $LIST_VERSIONS -ne 0 ]; then + echo Available Python versions: + python_versions + # Read the user's desired Python version. + # -r: treat backslashes as literal, -p: display prompt before input. + read -r -p "Enter the desired Python version: " PYTHON_VERSION + # Check the Python versions being passed in. + if [ -n "${PYTHON_VERSION+x}" ]; then + if python_versions | grep -E "^${PYTHON_VERSION}$" > /dev/null; then + echo Using Python version "$PYTHON_VERSION" + else + echo Error: Python version "$PYTHON_VERSION" is not installed. + exit 1 + fi + fi +fi # Remove any lingering local configuration. if [ $FORCE -ne 0 ]; then @@ -119,7 +206,7 @@ if [ $FORCE -ne 0 ]; then elif [[ -f .python-version ]]; then cat << 'END_OF_LINE' An existing .python-version file was found. Either remove this file yourself - or re-run with --force option to have it deleted along with the associated + or re-run with the --force option to have it deleted along with the associated virtual environment. rm .python-version @@ -129,10 +216,18 @@ END_OF_LINE fi # Create a new virtual environment for this project -if ! pyenv virtualenv "${env_name}"; then +# +# If $PYTHON_VERSION is undefined then the current pyenv Python version will be used. +# +# We can't quote ${PYTHON_VERSION:=} below since if the variable is +# undefined then we want nothing to appear; this is the reason for the +# "shellcheck disable" line below. +# +# shellcheck disable=SC2086 +if ! pyenv virtualenv ${PYTHON_VERSION:=} "${env_name}"; then cat << END_OF_LINE An existing virtual environment named $env_name was found. Either delete this - environment yourself or re-run with --force option to have it deleted. + environment yourself or re-run with the --force option to have it deleted. pyenv virtualenv-delete ${env_name} @@ -155,6 +250,9 @@ for req_file in "requirements-dev.txt" "requirements-test.txt" "requirements.txt fi done +# Install all necessary mypy type stubs +mypy --install-types src/ + # Install git pre-commit hooks now or later. pre-commit install ${INSTALL_HOOKS:+"--install-hooks"} @@ -193,5 +291,5 @@ else: END_OF_LINE )" -# Qapla +# Qapla' echo "Success!" diff --git a/setup.py b/setup.py deleted file mode 100644 index 54562a5f..00000000 --- a/setup.py +++ /dev/null @@ -1,85 +0,0 @@ -""" -This is the setup module for the foundry-vtt docker project. - -Based on: - -- https://packaging.python.org/distributing/ -- https://github.com/pypa/sampleproject/blob/master/setup.py -- https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure -""" - -# Standard Python Libraries -from glob import glob -from os.path import basename, splitext - -# Third-Party Libraries -from setuptools import find_packages, setup - - -def readme(): - """Read in and return the contents of the project's README.md file.""" - with open("README.md", encoding="utf-8") as f: - return f.read() - - -def package_vars(version_file): - """Read in and return the variables defined by the version_file.""" - pkg_vars = {} - with open(version_file) as f: - exec(f.read(), pkg_vars) # nosec - return pkg_vars - - -setup( - name="foundryvtt_docker", - # Versions should comply with PEP440 - version=package_vars("src/_version.py")["__version__"], - description="foundryvtt_docker python library", - long_description=readme(), - long_description_content_type="text/markdown", - url="https://github.com/felddy", - # The project's main homepage - download_url="https://github.com/felddy/foundryvtt-docker", - # Author details - author="Mark Feldhousen", - author_email="markf@geekpad.com", - license="License :: OSI Approved :: MIT License", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: MIT License", - "Natural Language :: English", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Games/Entertainment :: Role-Playing", - ], - python_requires=">=3.6", - # What does your project relate to? - keywords="foundryvtt", - packages=find_packages(where="src"), - package_dir={"": "src"}, - py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")], - install_requires=[ - "semver == 3.0.2", - "setuptools == 75.3.0", - "wheel == 0.44.0", - ], - extras_require={ - "test": [ - "coverage == 7.6.4", - # TODO: Revert to pinned once https://github.com/TheKevJames/coveralls-python/pull/542 is merged - "coveralls @ git+https://github.com/terop/coveralls-python.git@7fb2b536b04f61bb6a73ae5572a17e723459756d", - "docker == 7.1.0", - "pre-commit == 4.0.1", - "pytest == 8.3.3", - "pytest-cov == 6.0.0", - ] - }, -) diff --git a/src/_version.py b/src/_version.py index e3240814..ba448ca3 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1,3 +1,3 @@ """This file defines the version of this module.""" -__version__ = "13.332.0" +__version__ = "13.333.0" diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 01b7f4af..b44d39d0 100755 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -5,6 +5,7 @@ set -o errexit set -o pipefail CONFIG_DIR="/data/Config" +DEPRECATED_ENVS="CONTAINER_PRESERVE_OWNER FOUNDRY_UID FOUNDRY_GID TIMEZONE" LICENSE_FILE="${CONFIG_DIR}/license.json" # setup logging # shellcheck disable=SC2034 @@ -21,12 +22,12 @@ if [ "$1" = "--version" ]; then exit 0 fi -# Set the timezone before we start logging dates -if [ "$(id -u)" = 0 ]; then - # set timezone using environment - ln -snf /usr/share/zoneinfo/"${TIMEZONE:-UTC}" /etc/localtime - log_debug "Timezone set to: ${TIMEZONE:-UTC}" -fi +# Warn about deprecated environment variables +for deprecated_env in $DEPRECATED_ENVS; do + if [ -n "${!deprecated_env:-}" ]; then + log_warn "The environment variable \"$deprecated_env\" is deprecated and will be ignored." + fi +done # Setup the SIGTERM handler # shellcheck disable=SC2317 @@ -47,7 +48,7 @@ log_debug "CONTAINER_VERBOSE set. Debug logging enabled." log_debug "Running as: $(id)" log_debug "Environment:\n$(env | sort | sed -E 's/(.*PASSWORD|KEY.*)=.*/\1=[REDACTED]/g')" -cookiejar_file="cookiejar.json" +cookiejar_file="/tmp/cookiejar.json" license_min_length=24 secret_file="/run/secrets/config.json" @@ -198,13 +199,6 @@ if [ $install_required = true ]; then exit 1 fi - # TODO: This is a workaround for a "known issue" with FoundryVTT 13.332 - # Install classic-level module per release notes. - pushd resources/app > /dev/null - log "Installing classic-level module." - npm install classic-level --silent --no-audit --no-fund --no-progress - popd > /dev/null - if [[ "${CONTAINER_CACHE:-}" ]]; then log "Preserving release archive file in cache." # Check if CONTAINER_CACHE_SIZE is set and if so, ensure it's greater than 0 @@ -319,35 +313,10 @@ else log "Not modifying existing installation license key." fi -# ensure the permissions are set correctly -log "Setting data directory permissions." -FOUNDRY_UID="${FOUNDRY_UID:-foundry}" -FOUNDRY_GID="${FOUNDRY_GID:-foundry}" -log_debug "Setting ownership of /data to ${FOUNDRY_UID}:${FOUNDRY_GID}." -# skip files matching CONTAINER_PRESERVE_OWNER or already belonging to the right user and group -find /data \ - -regex "${CONTAINER_PRESERVE_OWNER:-}" -prune -or \ - "(" -user "${FOUNDRY_UID}" -and -group "${FOUNDRY_GID}" ")" -or \ - -exec chown "${FOUNDRY_UID}:${FOUNDRY_GID}" {} + -log_debug "Completed setting directory permissions." - -if [ "$1" = "--root-shell" ]; then - log_warn "Starting a shell as requested by argument --root-shell" - /bin/sh - exit $? -fi - -# drop privileges and handoff to launcher -log "Starting launcher with uid:gid as ${FOUNDRY_UID}:${FOUNDRY_GID}." -export CONTAINER_PRESERVE_CONFIG FOUNDRY_ADMIN_KEY FOUNDRY_AWS_CONFIG \ - FOUNDRY_COMPRESS_WEBSOCKET FOUNDRY_DEMO_CONFIG FOUNDRY_HOT_RELOAD FOUNDRY_HOSTNAME \ - FOUNDRY_IP_DISCOVERY FOUNDRY_LANGUAGE FOUNDRY_LOCAL_HOSTNAME FOUNDRY_MINIFY_STATIC_FILES \ - FOUNDRY_PASSWORD_SALT FOUNDRY_PROTOCOL FOUNDRY_PROXY_PORT FOUNDRY_PROXY_SSL \ - FOUNDRY_ROUTE_PREFIX FOUNDRY_SSL_CERT FOUNDRY_SSL_KEY FOUNDRY_TELEMETRY FOUNDRY_UPNP \ - FOUNDRY_UPNP_LEASE_DURATION FOUNDRY_WORLD +log "Starting launcher." # set the TERM signal handler trap handle_sigterm TERM -gosu "${FOUNDRY_UID}:${FOUNDRY_GID}" ./launcher.sh "$@" & +./launcher.sh "$@" & child_pid=$! log_debug "Waiting for child pid: ${child_pid} to exit." wait "$child_pid" diff --git a/src/launcher.sh b/src/launcher.sh index f09187b3..02b036fa 100755 --- a/src/launcher.sh +++ b/src/launcher.sh @@ -39,19 +39,13 @@ else fi fi -if [ "$1" = "--shell" ]; then - log_warn "Starting a shell as requested by argument --shell" - /bin/sh - exit $? -fi - if [[ "${FOUNDRY_IP_DISCOVERY:-}" == "false" ]]; then log "FOUNDRY_IP_DISCOVERY is set to false: Disabling IP discovery." # Add argument to disable IP discovery set -- "$@" --noipdiscovery fi -# Space seperated list of regex rules which environment variables must meet to +# Space separated list of regex rules which environment variables must meet to # be carried over to the new environment, which Node/Foundry will be running in. ENV_VAR_PASSLIST_REGEX='^HOME$ ^NODE_.+$' # Build list of environment variables to carry over into a clean environment diff --git a/src/patch_lang.ts b/src/patch_lang.ts index 21373cf3..398fe66e 100755 --- a/src/patch_lang.ts +++ b/src/patch_lang.ts @@ -2,7 +2,7 @@ import { readFileSync, writeFileSync } from "fs"; -const LANGUAGE_FILENAME: string = `${process.env.FOUNDRY_HOME}/resources/app/public/lang/en.json`; +const LANGUAGE_FILENAME: string = `${process.env.HOME}/resources/app/public/lang/en.json`; let data: any = JSON.parse(readFileSync(LANGUAGE_FILENAME, "utf8")); if (process.env.CONTAINER_PRESERVE_CONFIG !== "true") { diff --git a/tests/conftest.py b/tests/conftest.py index 5918eaea..fa56217e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -52,14 +52,13 @@ def main_container(image_tag): "CONTAINER_URL_FETCH_RETRY": 5, "CONTAINER_VERBOSE": True, "FOUNDRY_ADMIN_KEY": os.environ.get("FOUNDRY_ADMIN_KEY", "atropos"), - "FOUNDRY_GID": os.environ.get("FOUNDRY_GID", "foundry"), "FOUNDRY_PASSWORD": os.environ.get("FOUNDRY_PASSWORD"), - "FOUNDRY_UID": os.environ.get("FOUNDRY_UID", "foundry"), "FOUNDRY_USERNAME": os.environ.get("FOUNDRY_USERNAME"), - "TIMEZONE": "UTC", + "TZ": "UTC", }, name=MAIN_SERVICE_NAME, ports={"30000/tcp": None}, + user=f"{os.getuid()}:{os.getgid()}", volumes={str(Path.cwd() / Path("data")): {"bind": "/data", "driver": "local"}}, ) yield container