Skip to content

Podman/Docker compose support for flat-manager #125

@toastxc

Description

@toastxc

I noticed that there is a Dockerfile, but the README describes how to install postgres to the host...

I think there should be an example.container-compose.yml file at least, since its best practice to run databases in a container.

I made an example already however I'm having issues with it.

version: "3.8"
networks:
  flat:

services:
  db:
    image: postgres
    ports:
     - "${POSTGRES_PORTS}"
    volumes:
      - ./db:/data
    env_file:
      - .env
    networks:
      - flat
    environment:
      POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
      POSTGRES_DB: "${POSTGRES_DB}"

  backend:
    build: .
    ports:
      -  "${REPO_PORTS}"
    command: ["/usr/local/bin/flat-manager"]
    env_file:
      - .env
    depends_on:
      - db
      # restart: always
    networks:
      - flat
    volumes:
        - ./config.json:/config.json
# We want this for the diesel CLI app
DATABASE_URL=postgres://postgres:PSWD@db:5432/repo
# config file location
REPO_CONFIG=/config.json

POSTGRES_PASSWORD=PSWD
POSTGRES_PORTS=5432:5432
POSTGRES_DB="repo"




REPO_PORTS=8082:8082

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions