scheduler icon indicating copy to clipboard operation
scheduler copied to clipboard

Docker Compose instructions are not instructions

Open LostOnTheLine opened this issue 2 years ago • 4 comments

On the Installation Instructions under Option 2: Running with Docker Compose you just say to docker-compose up -d but the Docker-Compose provided needs arguments, none of which are explained anywhere.

When run with a base build of the Docker-Compose it returns this error in the Logs

Error: Database is uninitialized and superuser password is not specified.
       You must specify POSTGRES_PASSWORD to a non-empty value for the
       superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
       You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
       connections without a password. This is *not* recommended.
       See PostgreSQL documentation about "trust":
       https://www.postgresql.org/docs/current/auth-trust.html

Nowhere is anything given to say that that is required or that that needs to be added to the Docker-Compose file. Typicvally this is done by listing the compose on the Readme Page then listing Variables needed

version: '3'
services:
  scheduler-db:
    container_name: scheduler-db
    restart: always
    image: postgres:12-alpine
    ports:
      - 5432:5432
    volumes:
      - scheduler-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=scheduler
        # command: postgres -c 'log_statement=all'
    networks:
      - db
  scheduler-api:
    container_name: scheduler-api
    depends_on:
      - scheduler-db
    restart: always
    stop_signal: SIGINT
    image: akorn/scheduler
    ports:
      - 8080:8080
    environment:
      # - DSN=postgres://postgres:@db:5432/postgres?sslmode=disable
      - DSN=postgres://postgres:@scheduler-db:5432/postgres?sslmode=disable
      - PGPASSWORD=scheduler
      # - POSTGRES_PASSWORD=scheduler
    networks:
      - api
      - db
volumes:
  db:
    driver: local
networks:
  db:
  api:

Variables:

  • POSTGRES_PASSWORD= You need to create a password but it doesn't look like you ever need to use that password as it seems to only be used internally

LostOnTheLine avatar Dec 13 '22 07:12 LostOnTheLine

hey @LostOnTheLine, i was able to use the yml, altho i cant access the webui for it with the port 8080. the stack always exits with the error

2023/05/13 23:00:44 ERR: failed to apply migrations: dial tcp 127.0.0.1:5432: connect: connection refused

CoomInPickle avatar May 13 '23 23:05 CoomInPickle

hey @LostOnTheLine, i was able to use the yml, altho i cant access the webui for it with the port 8080. the stack always exits with the error

2023/05/13 23:00:44 ERR: failed to apply migrations: dial tcp 127.0.0.1:5432: connect: connection refused

What yaml did you use? The one from /misc/docker/docker-compose.yaml or the one I outlined? The one I outlined wasn't a fuctional one, it was an example of how things should be but aren't, but the information needed was not present.

I have updated it using the information from @dagid4's post, but haven't tested it. It looks as though the POSTGRES_PASSWORD=scheduler database variable needs to match a variable PGPASSWORD=scheduler in the API.

I personally have given up on trying to use this because the poorly written compose & lack of a response to issues gives me little faith in the development team.

LostOnTheLine avatar May 14 '23 00:05 LostOnTheLine

hey @LostOnTheLine, i was able to use the yml, altho i cant access the webui for it with the port 8080. the stack always exits with the error 2023/05/13 23:00:44 ERR: failed to apply migrations: dial tcp 127.0.0.1:5432: connect: connection refused

What yaml did you use? The one from /misc/docker/docker-compose.yaml or the one I outlined? The one I outlined wasn't a fuctional one, it was an example of how things should be but aren't, but the information needed was not present.

I have updated it using the information from @dagid4's post, but haven't tested it. It looks as though the POSTGRES_PASSWORD=scheduler database variable needs to match a variable PGPASSWORD=scheduler in the API.

I personally have given up on trying to use this because the poorly written compose & lack of a response to issues gives me little faith in the development team.

both by now, but i just cant access the webinterface with the normal ip and port i use, i made sure i use the correct port but with no luck. by now im trying jenkins do do it for me but is really hard and isnt the right thing for my needs

CoomInPickle avatar May 14 '23 00:05 CoomInPickle

version: '3'
services:
  scheduler-db:
    container_name: scheduler-db
    restart: always
    image: postgres:12-alpine
    ports:
      - 5432:5432
    volumes:
      - scheduler-db:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=scheduler
    # command: postgres -c 'log_statement=all'
    networks:
      - db
  scheduler-api:
    container_name: scheduler-api
    depends_on:
      - scheduler-db
    restart: always
    stop_signal: SIGINT
    image: akorn/scheduler
    ports:
      - 8080:8080
    environment:
      - DSN=postgres://postgres:scheduler@scheduler-db:5432/postgres?sslmode=disable
    networks:
      - api
      - db
volumes:
  db:
    driver: local
networks:
  db:
  api:

This compose.yaml works me.

This project doesn't suit my need so I removed it eventually. it has only ONE type of action, which is sending HTTP request.

lukedoomer avatar Jun 07 '24 02:06 lukedoomer