Files
CoqDecks/deployment/postgres/compose.yaml
T

59 lines
1.9 KiB
YAML

# This docker compose file is for building and running a production version of Massive Decks.
# This uses images built by the project.
# This version also configures a postgres server for data storage.
networks:
internal:
# You may not want docker to manage your data like this.
# Please see Docker's documentation for more on managing volumes: https://docs.docker.com/compose/compose-file/#volumes-top-level-element
volumes:
storage-volume:
# You will want to make a config, e.g:
# docker config create md_server_config config.json5
configs:
md_server_config:
external: true
services:
storage:
image: "postgres:14"
# See the postgres image's documentation for more on configuring it.
# https://hub.docker.com/_/postgres
environment:
- POSTGRES_USER=massivedecks
# This should be changed to a secret value, matched to the config.
- POSTGRES_PASSWORD=CHANGE ME
networks:
- internal
volumes:
- storage-volume:/var/lib/postgresql/data
restart: unless-stopped
server:
# Pick your tag wisely for stability. In general, it's best to specify an exact version by commit hash and update manually.
# Versioned tags are also provided, in order of stability: by version number (major "x", minor "x.y", and patch "x.y.z"), latest-release, latest-prerelease, or latest (head of main).
image: "ghcr.io/lattyware/massivedecks/server:latest-release"
depends_on:
- storage
environment:
- NODE_ENV=production
networks:
- internal
configs:
- source: md_server_config
target: /md/config.json5
restart: unless-stopped
client:
# Make sure you always deploy the exact same tag as the server and pull both at the same time.
image: "ghcr.io/lattyware/massivedecks/client:latest-release"
depends_on:
- server
ports:
- "80:8080/tcp"
networks:
- internal
restart: unless-stopped