Remotely docker-compose Konfiguration mit PostgreSQL-Datenbank

English Deutsch
docker_compose_remotely.yml
services:
  postgres:
    image: postgres
    restart: unless-stopped
    volumes:
      - ./pg_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=remotely
      - POSTGRES_USER=remotely
  remotely:
    image: immybot/remotely:latest
    restart: unless-stopped
    ports:
      - 38192:5000
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ASPNETCORE_HTTP_PORTS=5000
      - Remotely_ApplicationOptions__DbProvider=PostgreSQL
      - Remotely_ConnectionStrings__PostgreSQL=Host=postgres;Database=remotely;Username=remotely;Password=${POSTGRES_PASSWORD};
    volumes:
      - ./remotely_data:/app/AppData
    depends_on:
      - postgres

Erstellen Sie nun .env mit einem zufälligen Postgres-Passwort:

create_env_file.sh
echo "POSTGRES_PASSWORD=$(pwgen 30 1)" >> .env

Führen Sie dann docker-compose up -d aus, um die Dienste zu starten. Sie können nun auf Remotely unter http://localhost:38192 zugreifen.


Check out similar posts by category: Docker, DevOps