fp/docker-compose.yml

135 lines
3.7 KiB
YAML

services:
opentracker:
build:
context: .
dockerfile: dockerfiles/opentracker.dockerfile
container_name: opentracker
environment:
- WHITELIST_FEED_URL=http://bright:4000/torrents/whitelist?type=json
ports:
- "6969:6969/tcp"
- "6969:6969/udp"
- "8666:8666/tcp"
volumes:
- opentracker-etc:/etc/opentracker
- opentracker-var:/var/run/opentracker
# qbittorrent:
# build:
# context: .
# dockerfile: dockerfiles/qbittorrent.dockerfile
# environment:
# - PUID=1000
# - PGID=1000
# - UMASK=002
# - TZ=Etc/UTC
# - WEBUI_PORT=8181
# - WEBUI_PASSWORD=passwordpassword
# volumes:
# - cache:/root/.cache/futureporn
# container_name: qbittorrent
# ports:
# - "8181:8181/tcp"
# ## socat for exposing opentracker's named pipe (adder.fifo) to the docker network
# ## we use the named pipe to update the list of whitelisted torrents without having to reload the entire (huge) whitelist
# opentracker-socat:
# build:
# context: .
# dockerfile: dockerfiles/opentracker-socat.dockerfile
# container_name: opentracker-socat
# ports:
# - '8666:8666/tcp'
# volumes:
# # we use this volume to share adder.fifo
# - opentracker-var:/var/run/opentracker
# depends_on:
# - opentracker
bright:
container_name: bright
build:
context: .
dockerfile: dockerfiles/bright.dockerfile
target: dev
args:
- MIX_ENV=dev
environment:
MIX_ENV: dev
PORT: "4000"
DATABASE_HOSTNAME: db
SUPERSTREAMER_URL: http://superstreamer-api:52001
PUBLIC_S3_ENDPOINT: https://fp-dev.b-cdn.net
BT_TRACKER_URL: https://tracker.futureporn.net/announce
SITE_URL: https://futureporn.net
env_file:
- .kamal/secrets.development
ports:
- '4000:4000'
depends_on:
- db
# volumes:
# - cache:/root/.cache/futureporn
# - ./services/bright/lib:/app/lib
# - /home/cj/Documents/ueberauth_patreon:/app/contrib/ueberauth_patreon
develop:
watch:
- path: ./services/bright/
target: /app/
action: sync
- path: ./services/bright/application.ex
target: /app/lib/bright/application.ex
action: sync+restart
- path: ./services/bright/config/config.exs
target: /app/lib/bright/config/config.exs
action: sync+restart
- path: ./services/bright/config/runtime.exs
target: /app/lib/bright/config/runtime.exs
action: sync+restart
# @todo we need "docker@27.5.0" in devbox.json because we need docker compose >= `v2.32.0` for `sync+exec` feature.
# For now, we don't have `sync+exec` support which means docker image rebuilds are required when updating mix.exs
# - path: ./services/bright/mix.exs
# action: sync+exec
# target: /app/mix.exs
# exec:
# command: mix deps.get
- path: ./services/bright/mix.exs
target: /app/mix.exs
action: sync+restart
# - path: /home/cj/Documents/ueberauth_patreon
# action: sync
# target: /app/contrib/ueberauth_patreon
db:
image: postgres:15
container_name: futureporn-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: bright
volumes:
- pg_data:/var/lib/postgresql/data
ports:
- '5432:5432'
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4
ports:
- '5050:5050'
depends_on:
- db
environment:
PGADMIN_LISTEN_PORT: "5050"
env_file:
- .kamal/secrets.development
volumes:
pg_data:
redis_data:
cache:
opentracker-var:
opentracker-etc: