Repository: crazy-max/docker-firefox-syncserver Branch: master Commit: 88e7aa9ff385 Files: 24 Total size: 28.9 KB Directory structure: gitextract_j8dwbbq_/ ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ └── bug_report.md │ ├── SUPPORT.md │ ├── dependabot.yml │ ├── labels.yml │ └── workflows/ │ ├── build.yml │ ├── labels.yml │ └── test.yml ├── .gitignore ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── docker-bake.hcl ├── entrypoint.sh └── examples/ ├── compose/ │ ├── docker-compose.yml │ └── firefox-syncserver.env └── traefik/ ├── README.md ├── docker-compose.yml └── firefox-syncserver.env ================================================ FILE CONTENTS ================================================ ================================================ FILE: .dockerignore ================================================ /.dev /.idea /*.iml /.git /.github /examples /.editorconfig /.gitattributes /.gitignore /CHANGELOG.md /LICENSE /README.md ================================================ FILE: .editorconfig ================================================ # editorconfig.org root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false ================================================ FILE: .gitattributes ================================================ /*.sh linguist-detectable=false ================================================ FILE: .github/CODEOWNERS ================================================ * @crazy-max ================================================ FILE: .github/FUNDING.yml ================================================ github: crazy-max custom: https://www.paypal.me/crazyws ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve --- ### Behaviour #### Steps to reproduce this issue 1. 2. 3. #### Expected behaviour > Tell me what should happen #### Actual behaviour > Tell me what happens instead ### Configuration * Docker version (type `docker --version`) : * Docker compose version if applicable (type `docker-compose --version`) : * Platform (Debian 9, Ubuntu 18.04, ...) : * System info (type `uname -a`) : * Include all necessary configuration files : `docker-compose.yml`, `.env`, ... ### Docker info ``` > Output of command `docker info` ``` ### Logs ``` > Container logs (set FF_SYNCSERVER_LOGLEVEL to debug if applicable) ``` ================================================ FILE: .github/SUPPORT.md ================================================ # Support [](https://isitmaintained.com/project/crazy-max/docker-firefox-syncserver) ## Reporting an issue Please do a search in [open issues](https://github.com/crazy-max/docker-firefox-syncserver/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed. If you find your issue already exists, make relevant comments and add your [reaction](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments). Use a reaction in place of a "+1" comment. :+1: - upvote :-1: - downvote If you cannot find an existing issue that describes your bug or feature, submit an issue using the guidelines below. ## Writing good bug reports and feature requests File a single issue per problem and feature request. * Do not enumerate multiple bugs or feature requests in the same issue. * Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes. The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix. You are now ready to [create a new issue](https://github.com/crazy-max/docker-firefox-syncserver/issues/new/choose)! ## Closure policy * Support directly related to Firefox Syncserver will not be provided if your problem is not related to the operation of this image. * Issues that don't have the information requested above (when applicable) will be closed immediately and the poster directed to the support guidelines. * Issues that go a week without a response from original poster are subject to closure at my discretion. ================================================ FILE: .github/dependabot.yml ================================================ version: 2 updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "daily" time: "08:00" timezone: "Europe/Paris" labels: - ":game_die: dependencies" - ":robot: bot" ================================================ FILE: .github/labels.yml ================================================ ## more info https://github.com/crazy-max/ghaction-github-labeler - # automerge name: ":bell: automerge" color: "8f4fbc" description: "" - # bot name: ":robot: bot" color: "69cde9" description: "" - # bug name: ":bug: bug" color: "b60205" description: "" - # dependencies name: ":game_die: dependencies" color: "0366d6" description: "" - # documentation name: ":memo: documentation" color: "c5def5" description: "" - # duplicate name: ":busts_in_silhouette: duplicate" color: "cccccc" description: "" - # enhancement name: ":sparkles: enhancement" color: "0054ca" description: "" - # feature request name: ":bulb: feature request" color: "0e8a16" description: "" - # feedback name: ":mega: feedback" color: "03a9f4" description: "" - # future maybe name: ":rocket: future maybe" color: "fef2c0" description: "" - # good first issue name: ":hatching_chick: good first issue" color: "7057ff" description: "" - # help wanted name: ":pray: help wanted" color: "4caf50" description: "" - # invalid name: ":no_entry_sign: invalid" color: "e6e6e6" description: "" - # investigate name: ":mag: investigate" color: "e6625b" description: "" - # needs more info name: ":thinking: needs more info" color: "795548" description: "" - # pinned name: ":pushpin: pinned" color: "28008e" description: "" - # question name: ":question: question" color: "3f51b5" description: "" - # sponsor name: ":sparkling_heart: sponsor" color: "fedbf0" description: "" - # stale name: ":skull: stale" color: "237da0" description: "" - # upstream name: ":eyes: upstream" color: "fbca04" description: "" - # wontfix name: ":coffin: wontfix" color: "ffffff" description: "" ================================================ FILE: .github/workflows/build.yml ================================================ name: build concurrency: group: build-${{ github.ref }} cancel-in-progress: true on: push: branches: - 'master' tags: - '*' paths-ignore: - '**.md' pull_request: branches: - 'master' paths-ignore: - '**.md' env: DOCKERHUB_SLUG: crazymax/firefox-syncserver GHCR_SLUG: ghcr.io/crazy-max/firefox-syncserver jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Docker meta id: meta uses: docker/metadata-action@v4 with: images: | ${{ env.DOCKERHUB_SLUG }} ${{ env.GHCR_SLUG }} tags: | type=match,pattern=(.*)-r,group=1 type=ref,event=pr type=edge labels: | org.opencontainers.image.title=Firefox Sync Server org.opencontainers.image.description=Firefox Sync Server org.opencontainers.image.vendor=CrazyMax - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Login to DockerHub if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GHCR if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build uses: docker/bake-action@v3 with: files: | ./docker-bake.hcl ${{ steps.meta.outputs.bake-file }} targets: image-all push: ${{ github.event_name != 'pull_request' }} - name: Check manifest if: github.event_name != 'pull_request' run: | docker buildx imagetools inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} - name: Inspect image if: github.event_name != 'pull_request' run: | docker pull ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} docker image inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }} docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} ================================================ FILE: .github/workflows/labels.yml ================================================ name: labels on: push: branches: - 'master' paths: - '.github/labels.yml' - '.github/workflows/labels.yml' jobs: labeler: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Run Labeler uses: crazy-max/ghaction-github-labeler@v4 ================================================ FILE: .github/workflows/test.yml ================================================ name: test on: push: branches: - 'master' paths-ignore: - '**.md' pull_request: branches: - 'master' paths-ignore: - '**.md' jobs: test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Prepare id: prep run: | echo ::set-output name=build_tag::test echo ::set-output name=container_name::firefox-syncserver echo ::set-output name=running_timeout::120 echo ::set-output name=running_log_check::Listening at - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Build uses: docker/bake-action@v3 with: targets: image-local env: DEFAULT_TAG: ${{ steps.prep.outputs.build_tag }} - name: Start container run: | docker rm -f ${{ steps.prep.outputs.container_name }} > /dev/null 2>&1 || true docker run -d --name ${{ steps.prep.outputs.container_name }} \ -e "FF_SYNCSERVER_SECRET=5up3rS3kr1t" \ ${{ steps.prep.outputs.build_tag }} - name: Test run run: | TIMEOUT=$((SECONDS + ${{ steps.prep.outputs.running_timeout }})) while read LOGLINE; do echo ${LOGLINE} if [[ ${LOGLINE} == *"${{ steps.prep.outputs.running_log_check }}"* ]]; then echo "🎉 Container up!" break fi if [[ $SECONDS -gt ${TIMEOUT} ]]; then >&2 echo "❌ Failed to run ${{ steps.prep.outputs.container_name }} container" docker rm -f ${{ steps.prep.outputs.container_name }} > /dev/null 2>&1 || true exit 1 fi done < <(docker logs -f ${{ steps.prep.outputs.container_name }} 2>&1) CONTAINER_STATUS=$(docker container inspect --format "{{.State.Status}}" ${{ steps.prep.outputs.container_name }}) if [[ ${CONTAINER_STATUS} != "running" ]]; then >&2 echo "❌ Container ${{ steps.prep.outputs.container_name }} returned status '$CONTAINER_STATUS'" docker rm -f ${{ steps.prep.outputs.container_name }} > /dev/null 2>&1 || true exit 1 fi docker rm -f ${{ steps.prep.outputs.container_name }} > /dev/null 2>&1 || true echo ================================================ FILE: .gitignore ================================================ /.dev # JetBrains /.idea /*.iml ================================================ FILE: CHANGELOG.md ================================================ # Changelog ## 1.8.0-r15 (2021/03/04) * Renamed `yasu` (more info https://github.com/crazy-max/yasu#yet-another) ## 1.8.0-r14 (2021/03/02) * Switch to `gosu` ## 1.8.0-RC13 (2020/12/12) * Add postgres support (#42) ## 1.8.0-RC12 (2019/12/07) * Fix timezone ## 1.8.0-RC11 (2019/11/17) * Allow to set custom `PUID`/`PGID` * Allow to use Docker secrets for `FF_SYNCSERVER_SECRET` * mozilla-services/syncserver@5932c46 ## 1.8.0-RC10 (2019/09/26) * Switch to GitHub Actions * :warning: Stop publishing Docker image on Quay * Multi-platform Docker image * mozilla-services/syncserver@e9b63a0 * :warning: Run as non-root user * Fix access log issue if not defined * Implicit timezone through tzdata package > :warning: **UPGRADE NOTES** > As the Docker container now runs as a non-root user, you have to first stop the container and change permissions to `data` volume: > ``` > docker-compose stop > chown -R 1000:1000 data/ > docker-compose pull > docker-compose up -d > ``` ## 1.8.0-RC9 (2019/08/05) * Option to enable access log (`FF_SYNCSERVER_ACCESSLOG`) * Option to tune log level (`FF_SYNCSERVER_LOGLEVEL`) * Issue with healthcheck, remove for now (#10) ## 1.8.0-RC8 (2019/08/04) * Add healthcheck * Alpine Linux 3.10 ## 1.8.0-RC7 (2019/06/23) * mozilla-services/syncserver@ac7b29c ## 1.8.0-RC6 (2019/03/21) * Option to allow forwarded IPs (PR #7) ## 1.8.0-RC5 (2019/03/20) * Switch to Alpine 3.9 based image ## 1.8.0-RC4 (2019/02/04) * Fix build (pypa/pip#6158) ## 1.8.0-RC3 (2019/01/22) * Add `FF_SYNCSERVER_SQLURI` env var (#5) * No need to put `syncserver.ini` in data folder ## 1.8.0-RC2 (2018/07/27) * Switch to Alpine 3.8 based image ## 1.8.0-RC1 (2018/05/25) * Firefox Sync Server 1.8.0 ## 1.7.0-RC2 (2018/05/25) * Come back to Firefox Sync Server 1.7.0 ## 1.6.0-RC3 (2018/05/25) * Wrong tag pushed (1.7.0) * No need of Supervisor ## 1.7.0-RC1 (2018/02/17) * Firefox Sync Server 1.7.0 * No need of Supervisor ## 1.6.0-RC2 (2018/01/10) * Python image updated ## 1.6.0-RC1 (2017/12/25) * Initial version based on Firefox Sync Server 1.6.0 ================================================ FILE: Dockerfile ================================================ ARG SYNCSERVER_VERSION=1.8.0 ARG SHA1_COMMIT=5932c464d70ec9cf0344b1d3e970b3711de6a98e FROM crazymax/yasu:latest AS yasu FROM python:2.7-alpine3.10 ARG SYNCSERVER_VERSION ARG SHA1_COMMIT RUN apk --update --no-cache add \ bash \ curl \ libffi \ libressl \ libstdc++ \ mariadb-client \ postgresql-client \ shadow \ tzdata \ && apk --update --no-cache add -t build-dependencies \ build-base \ gcc \ git \ libffi-dev \ libressl-dev \ mariadb-dev \ musl-dev \ postgresql-dev \ python-dev \ && git clone https://github.com/mozilla-services/syncserver app \ && cd app \ && git reset --hard $SHA1_COMMIT \ && pip install --upgrade --no-cache-dir -r requirements.txt \ && pip install --upgrade --no-cache-dir -r dev-requirements.txt \ && pip install psycopg2 pymysql \ && apk del build-dependencies \ && rm -rf /tmp/* /var/cache/apk/* \ && python ./setup.py develop ENV TZ="UTC" \ PUID="1000" \ PGID="1000" COPY --from=yasu / / COPY entrypoint.sh /entrypoint.sh RUN chmod a+x /entrypoint.sh \ && mkdir -p /data /opt/syncserver \ && addgroup -g ${PGID} syncserver \ && adduser -u ${PUID} -G syncserver -h /data -s /bin/sh -D syncserver \ && chown -R syncserver. /data /opt/syncserver EXPOSE 5000 VOLUME [ "/data" ] ENTRYPOINT [ "/entrypoint.sh" ] CMD [ "/usr/local/bin/gunicorn", "--paste", "/opt/syncserver/syncserver.ini" ] ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2017-2023 CrazyMax Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
## ⚠️ Abandoned project This project is not maintained anymore and is abandoned. Feel free to fork and make your own changes if needed. ## About [Firefox Sync Server](http://moz-services-docs.readthedocs.io/en/latest/howtos/run-sync-1.5.html) Docker image. > **Note** > > Want to be notified of new releases? Check out 🔔 [Diun (Docker Image Update Notifier)](https://github.com/crazy-max/diun) > project! ___ * [Features](#features) * [Build locally](#build-locally) * [Image](#image) * [Environment variables](#environment-variables) * [Volumes](#volumes) * [Ports](#ports) * [Usage](#usage) * [Docker Compose](#docker-compose) * [Command line](#command-line) * [Notes](#notes) * [Use with MySQL database](#use-with-mysql-database) * [Use with PostgreSQL database](#use-with-postgresql-database) * [Upgrade](#upgrade) * [Contributing](#contributing) * [License](#license) ## Features * Run as non-root user * Multi-platform image * [Traefik](https://github.com/containous/traefik-library-image) as reverse proxy and creation/renewal of Let's Encrypt certificates (see [this template](examples/traefik)) ## Build locally ```shell git clone https://github.com/crazy-max/docker-firefox-syncserver.git cd docker-firefox-syncserver # Build image and output to docker (default) docker buildx bake # Build multi-platform image docker buildx bake image-all ``` ## Image | Registry | Image | |--------------------------------------------------------------------------------------------------|---------------------------------| | [Docker Hub](https://hub.docker.com/r/crazymax/firefox-syncserver/) | `crazymax/firefox-syncserver` | | [GitHub Container Registry](https://github.com/users/crazy-max/packages/container/package/firefox-syncserver) | `ghcr.io/crazy-max/firefox-syncserver` | Following platforms for this image are available: ``` $ docker run --rm mplatform/mquery crazymax/firefox-syncserver:latest Image: crazymax/firefox-syncserver:latest * Manifest List: Yes * Supported platforms: - linux/amd64 - linux/arm/v6 - linux/arm/v7 - linux/arm64 - linux/386 - linux/ppc64le - linux/s390x ``` ## Environment variables * `TZ`: The timezone assigned to the container (default `UTC`) * `PUID`: Process UID (default `1000`) * `PGID`: Process GID (default `1000`) * `FF_SYNCSERVER_ACCESSLOG`: Display access log (default `false`) * `FF_SYNCSERVER_LOGLEVEL`: Log level output (default `info`) * `FF_SYNCSERVER_PUBLIC_URL`: Must be edited to point to the public URL of your server (default `http://localhost:5000`). * `FF_SYNCSERVER_SECRET`: This is a secret key used for signing authentication tokens. It should be long and randomly-generated. * `FF_SYNCSERVER_ALLOW_NEW_USERS`: Set this to `false` to disable new-user signups on the server. Only request by existing accounts will be honoured (default `true`). * `FF_SYNCSERVER_FORCE_WSGI_ENVIRON`: Set this to `true` to work around a mismatch between public_url and the application URL as seen by python, which can happen in certain reverse-proxy hosting setups (default `false`). * `FF_SYNCSERVER_SQLURI`: Defines the database in which to store all server data (default `sqlite:///data/syncserver.db`). * `FF_SYNCSERVER_FORWARDED_ALLOW_IPS`: Set this to `*` or an IP range if you use an Nginx reverse proxy (optional). > 💡 `FF_SYNCSERVER_SECRET_FILE` can be used to fill in the value from a file, especially for Docker's secrets feature. ## Volumes * `/data`: Contains SQLite database if `FF_SYNCSERVER_SQLURI` is untouched > :warning: Note that the volumes should be owned by the user/group with the specified `PUID` and `PGID`. If you don't give the volume correct permissions, the container may not start. ## Ports * `5000`: Gunicorn port ## Usage ### Docker Compose Docker compose is the recommended way to run this image. You can use the following [docker compose template](examples/compose/docker-compose.yml), then run the container: ```bash docker-compose up -d docker-compose logs -f ``` ### Command line You can also use the following minimal command: ```bash $ docker run -d -p 5000:5000 --name firefox_syncserver \ -e TZ="Europe/Paris" \ -e FF_SYNCSERVER_SECRET="5up3rS3kr1t" \ -v $(pwd)/data:/data \ crazymax/firefox-syncserver:latest ``` ## Notes ### Use with MySQL database Set `FF_SYNCSERVER_SQLURI=pymysql://user:password@mysql_server_ip/db_name` ### Use with PostgreSQL database Set `FF_SYNCSERVER_SQLURI=postgresql://user:password@postgresql_server_ip/db_name` ## Upgrade Recreate the container whenever I push an update: ```bash docker-compose pull docker-compose up -d ``` ## Contributing Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) or by making a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely! Thanks again for your support, it is much appreciated! :pray: ## License MIT. See `LICENSE` for more details. ================================================ FILE: docker-bake.hcl ================================================ variable "DEFAULT_TAG" { default = "msmtpd:local" } // Special target: https://github.com/docker/metadata-action#bake-definition target "docker-metadata-action" { tags = ["${DEFAULT_TAG}"] } // Default target if none specified group "default" { targets = ["image-local"] } target "image" { inherits = ["docker-metadata-action"] } target "image-local" { inherits = ["image"] output = ["type=docker"] } target "image-all" { inherits = ["image"] platforms = [ "linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64", "linux/386", "linux/ppc64le", "linux/s390x" ] } ================================================ FILE: entrypoint.sh ================================================ #!/bin/bash TZ=${TZ:-UTC} FF_SYNCSERVER_ACCESSLOG=${FF_SYNCSERVER_ACCESSLOG:-false} FF_SYNCSERVER_LOGLEVEL=${FF_SYNCSERVER_LOGLEVEL:-info} FF_SYNCSERVER_PUBLIC_URL=${FF_SYNCSERVER_PUBLIC_URL:-http://localhost:5000/} FF_SYNCSERVER_ALLOW_NEW_USERS=${FF_SYNCSERVER_ALLOW_NEW_USERS:-true} FF_SYNCSERVER_FORCE_WSGI_ENVIRON=${FF_SYNCSERVER_FORCE_WSGI_ENVIRON:-false} FF_SYNCSERVER_SQLURI=${FF_SYNCSERVER_SQLURI:-sqlite:///data/syncserver.db} # From https://github.com/docker-library/mariadb/blob/master/docker-entrypoint.sh#L21-L41 # usage: file_env VAR [DEFAULT] # ie: file_env 'XYZ_DB_PASSWORD' 'example' # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of # "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) file_env() { local var="$1" local fileVar="${var}_FILE" local def="${2:-}" if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then echo >&2 "error: both $var and $fileVar are set (but are exclusive)" exit 1 fi local val="$def" if [ "${!var:-}" ]; then val="${!var}" elif [ "${!fileVar:-}" ]; then val="$(< "${!fileVar}")" fi export "$var"="$val" unset "$fileVar" } if [ -n "${PGID}" ] && [ "${PGID}" != "$(id -g syncserver)" ]; then echo "Switching to PGID ${PGID}..." sed -i -e "s/^syncserver:\([^:]*\):[0-9]*/syncserver:\1:${PGID}/" /etc/group sed -i -e "s/^syncserver:\([^:]*\):\([0-9]*\):[0-9]*/syncserver:\1:\2:${PGID}/" /etc/passwd fi if [ -n "${PUID}" ] && [ "${PUID}" != "$(id -u syncserver)" ]; then echo "Switching to PUID ${PUID}..." sed -i -e "s/^syncserver:\([^:]*\):[0-9]*:\([0-9]*\)/syncserver:\1:${PUID}:\2/" /etc/passwd fi # Timezone echo "Setting timezone to ${TZ}..." ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime echo ${TZ} > /etc/timezone # Check secret echo "Checking prerequisites..." file_env 'FF_SYNCSERVER_SECRET' if [ -z "$FF_SYNCSERVER_SECRET" ] ; then >&2 echo "ERROR: Either FF_SYNCSERVER_SECRET or FF_SYNCSERVER_SECRET_FILE must be defined" exit 1 fi SYNCSERVER_INI_PATH="/opt/syncserver/syncserver.ini" GU_ACCESSLOG="accesslog = -" if [ "$FF_SYNCSERVER_ACCESSLOG" != true ]; then GU_ACCESSLOG= fi # Config echo "Generating configuration..." cat > "$SYNCSERVER_INI_PATH" <