#:schema https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json

[services.firefish]
image = "registry.joinfirefish.org/firefish/firefish:beta-amd64"
container_name = "firefish"
restart = "unless-stopped"
depends_on = ["redis"]
ports = ["3083:3000"]
networks = ["firefish", "proxy", "postgres"]
environment = { NODE_ENV = "production" }
volumes = [
  "/docker/firefish/files:/firefish/files",
  "/docker/firefish/config:/firefish/.config:ro",
]

[services.redis]
image = "redis"
container_name = "redis-firefish"
restart = "unless-stopped"
networks = ["firefish"]
volumes = ["/docker/firefish/redis:/data"]

[services.sonic]
image = "valeriansaliou/sonic:v1.4.0"
container_name = "sonic-firefish"
logging = { driver = "none" }
networks = ["firefish"]
volumes = [
  "/docker/firefish/sonic:/var/lib/sonic/store",
  "/docker/firefish/sonic/config.cfg:/etc/sonic.cfg",
]
env_file = ".env"

[networks.firefish]
internal = true

[networks.proxy]
external = true

[networks.postgres]
external = true
