Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:felddy/foundryvtt-docker into re…
Browse files Browse the repository at this point in the history
…lease-dev
  • Loading branch information
felddy committed Oct 16, 2020
2 parents 5435879 + 273870e commit d7b5392
Show file tree
Hide file tree
Showing 17 changed files with 489 additions and 209 deletions.
333 changes: 279 additions & 54 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

34 changes: 26 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
---

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 8 * * 6'
- cron: '0 21 * * 6'

jobs:
analyse:
name: Analyse
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript',
# 'python']
language: ['javascript', 'python']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -31,10 +46,13 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your
# languages
# with:
# languages: go, javascript, csharp, python, cpp, java
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a
# config file. By default, queries listed here will override any
# specified in a config file. Prefix the list here with "+" to use
# these queries and those in the config file. queries:
# ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or
# Java). If this step fails, then you should remove it and run the build
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/prerelease.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/release.yml

This file was deleted.

78 changes: 78 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
[https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq
)
21 changes: 4 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
ARG CREATED_TIMESTAMP=unspecified
ARG FOUNDRY_PASSWORD
ARG FOUNDRY_RELEASE_URL
ARG FOUNDRY_USERNAME
ARG FOUNDRY_VERSION=0.6.6
ARG GIT_COMMIT=unspecified
ARG GIT_REMOTE=unspecified
ARG VERSION

FROM node:12-alpine as optional-release-stage
Expand Down Expand Up @@ -38,23 +35,14 @@ RUN \

FROM node:12-alpine as final-stage

ARG CREATED_TIMESTAMP=unspecified
ARG FOUNDRY_UID=421
ARG FOUNDRY_VERSION
ARG GIT_COMMIT
ARG GIT_REMOTE
ARG TARGETPLATFORM
ARG VERSION

LABEL com.foundryvtt.version=${FOUNDRY_VERSION}
LABEL org.opencontainers.image.authors="[email protected]"
LABEL org.opencontainers.image.created=${CREATED_TIMESTAMP}
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
LABEL org.opencontainers.image.source=${GIT_REMOTE}
LABEL org.opencontainers.image.title="Foundry Virtual Tabletop"
LABEL org.opencontainers.image.vendor="Geekpad"
LABEL org.opencontainers.image.version=${VERSION}

ENV FOUNDRY_HOME="/home/foundry"
ENV FOUNDRY_VERSION=${FOUNDRY_VERSION}
Expand All @@ -64,6 +52,7 @@ WORKDIR ${FOUNDRY_HOME}
COPY --from=optional-release-stage /root/dist/ .
COPY \
src/authenticate.js \
src/check_health.sh \
src/entrypoint.sh \
src/get_license.js \
src/get_release_url.js \
Expand All @@ -87,8 +76,6 @@ VOLUME ["/data"]
EXPOSE 30000/TCP

ENTRYPOINT ["./entrypoint.sh"]
CMD ["resources/app/main.js", "--port=30000", "--headless", "--dataPath=/data"]
HEALTHCHECK --start-period=3m --interval=30s --timeout=5s \
CMD /usr/bin/curl --cookie-jar healthcheck-cookiejar.txt \
--cookie healthcheck-cookiejar.txt --fail --silent \
http://localhost:30000/api/status || exit 1
CMD ["resources/app/main.js", "--port=30000", "--headless", "--noupdate",\
"--dataPath=/data"]
HEALTHCHECK --start-period=3m --interval=30s --timeout=5s CMD ./check_health.sh
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

[![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)
[![Platforms](https://img.shields.io/badge/platforms-386%20%7C%20amd64%20%7C%20arm%2Fv6%20%7C%20arm%2Fv7%20%7C%20arm64%20%7C%20ppc64le%20%7C%20s390x-blue)](https://hub.docker.com/r/felddy/foundryvtt/tags)
[![Platforms](https://img.shields.io/badge/platforms-amd64%20%7C%20arm%2Fv6%20%7C%20arm%2Fv7%20%7C%20arm64%20%7C%20ppc64le%20%7C%20s390x-blue)](https://hub.docker.com/r/felddy/foundryvtt/tags)

You can get a [Foundry Virtual Tabletop](https://foundryvtt.com) instance up and
running in minutes using this container. This Docker container is designed to
Expand Down Expand Up @@ -262,7 +262,6 @@ be of the form: `foundryvtt-0.6.6.zip`
| FOUNDRY_GID | `gid` the deamon 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_LICENSE_KEY | The license key to install. e.g.; `AAAA-BBBB-CCCC-DDDD-EEEE-FFFF` If left unset, a license key will be fetched when using account authentication. If multiple license keys are associated with an account, one will be chosen at random. Specific licenses can be selected by passing in an integer index. The first license key being `1`. May be set [using secrets](#using-secrets). | |
| FOUNDRY_NO_UPDATE | Prevent the application from being updated from the web interface. The application code is immutable when running in a container. See the [Updating](#updating) section for the steps needed to update this container. | true |
| FOUNDRY_PROXY_PORT | Inform the Foundry Server that the software is running behind a reverse proxy on some other port. This allows the invitation links created to the game to include the correct external port. | null |
| FOUNDRY_PROXY_SSL | Indicates whether the software is running behind a reverse proxy that uses SSL. This allows invitation links and A/V functionality to work as if the Foundry Server had SSL configured directly. | false |
| FOUNDRY_ROUTE_PREFIX | A string path which is appended to the base hostname to serve Foundry VTT content from a specific namespace. For example setting this to `demo` will result in data being served from `http://x.x.x.x:30000/demo/`. | null |
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: "3.8"
services:
foundry:
# Run the container normally
image: felddy/foundryvtt:0.6.6
image: felddy/foundryvtt:latest
hostname: felddy_foundryvtt
init: true
restart: "no"
Expand All @@ -29,7 +29,7 @@ services:

foundry-version:
# Run the container to collect version information
image: felddy/foundryvtt:0.6.6
image: felddy/foundryvtt:latest
init: true
restart: "no"
command: --version
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:
# - FOUNDRY_GID=foundry
# - FOUNDRY_HOSTNAME=
# - FOUNDRY_LICENSE_KEY=
# - FOUNDRY_NO_UPDATE=true
# - FOUNDRY_PROXY_PORT=
# - FOUNDRY_PROXY_SSL=false
# - FOUNDRY_RELEASE_URL=
Expand Down
6 changes: 3 additions & 3 deletions patches/hotfix_2020062801-0.6.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ PATCH_URL="https://cdn.discordapp.com/attachments/725021759144984646/72685872995
TARGET_FOUNDRY_VERSION="0.6.4"

if [ "$FOUNDRY_VERSION" = "$TARGET_FOUNDRY_VERSION" ]; then
echo "Applying \"${PATCH_NAME}\""
echo "See: ${PATCH_DOC_URL}"
log "Applying \"${PATCH_NAME}\""
log "See: ${PATCH_DOC_URL}"
curl --output "${PATCH_DEST}" "${PATCH_URL}" 2>&1 | tr "\r" "\n"
else
echo "Not applying \"${PATCH_NAME}\". This patch is targeted for Foundry Virtual Tabletop ${TARGET_FOUNDRY_VERSION}"
log_warn "Not applying \"${PATCH_NAME}\". This patch is targeted for Foundry Virtual Tabletop ${TARGET_FOUNDRY_VERSION}"
fi
Loading

0 comments on commit d7b5392

Please sign in to comment.