Skip to content

Does not create database while doing the docker compose up -d #2

Open

Description

@PauloSeravia

I had to add the following to the docker-compose.yml

environment:
POSTGRES_DB: customer

Activity

  1. lennsw commented on Dec 28, 2021

    @lennsw

    I had to add the following to the docker-compose.yml

    environment: POSTGRES_DB: customer

    Check if you have your desktop docker running

  2. Djungarik commented on Mar 14, 2022

    @Djungarik

    If you get password authentication failed for user error then change volumes in .yml file
    volumes:
    - ./postgres-data:/var/lib/postgresql/data

  3. cami-la commented on May 25, 2022

    @cami-la
    services:
      postgres:
        container_name: postgres
        image: postgres
        environment:
          POSTGRES_USER: ${POSTGRES_USER:-amigoscode}
          POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
          PGDATA: /data/postgres
        volumes:
          - type: volume
            source: postgres
            target: /data/postgres
        ports:
          - "5431:5432"
        networks:
          - postgres
        restart: unless-stopped
      pgadmin:
        container_name: pgadmin
        image: dpage/pgadmin4
        environment:
          PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
          PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
          PGADMIN_CONFIG_SERVER_MODE: 'False'
        volumes:
          - type: volume
            source: pgadmin
            target: /var/lib/pgadmin
        ports:
          - "${PGADMIN_PORT:-5050}:80"
        networks:
          - postgres
        restart: unless-stopped
    
    networks:
      postgres:
        driver: bridge
    
    volumes:
      postgres:
      pgadmin:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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