Skip to content

Instantly share code, notes, and snippets.

@bruvv
Created October 27, 2022 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruvv/7510bc77874849abb43cf18d380c34ce to your computer and use it in GitHub Desktop.
Save bruvv/7510bc77874849abb43cf18d380c34ce to your computer and use it in GitHub Desktop.
version: '3'
services:
postgres:
ports:
- '5432:5432'
environment:
- POSTGRES_USER=mirror_db_user
- POSTGRES_PASSWORD=mirror_db_pass
volumes:
- ./mirror:/mirror
image: postgres:alpine
sb-mirror:
image: mchangrh/sb-mirror:latest
build: ./build/sb-mirror
# map port externally
ports:
- "873:873"
environment:
- MIRROR=TRUE # enable cronjob
- MIRROR_URL=qc.mchang.xyz # override to set upstream mirror
- VALIDATE=TRUE # enable rsync checksum validation
- CSVLINT=TRUE # lint csv files (will just stop sqlite3 from complaining)
- SQLITE=TRUE # generate .db in /export
# SQLITE will not always generate usable files since postgres does not export files correctly.
- PADDING_VAR=false # here to make compose not complain
volumes:
- ./mirror:/mirror
- ./export:/export
sb-server:
ports:
- "8080:8080"
volumes:
- ./export/:/app/database/
# - ./sqlite-config.json:/app/config.json
# - ./postgres-config.json:/app/config.json
image: ghcr.io/ajayyy/sb-server:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment