Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Compose entrypoint and command ignored #1554

Closed
jt-helsinki opened this issue Oct 26, 2024 · 1 comment
Closed

Docker Compose entrypoint and command ignored #1554

jt-helsinki opened this issue Oct 26, 2024 · 1 comment

Comments

@jt-helsinki
Copy link

jt-helsinki commented Oct 26, 2024

The martin docker compose setup is ignoring the command under the martin service. The output in the console is

martin-1            | [2024-10-26T18:51:27Z INFO  martin] Config file is not specified, auto-detecting sources

Further no output is written into the config directory.

This command "should" be appended to the ENTRYPOINT specified in the martin docker file (ENTRYPOINT ["/usr/local/bin/martin"] ) as per the output from running

docker image history --no-trunc ghcr.io/maplibre/martin:latest

Alternatively, if I add the following to the martin service I am still given the same console output.

entrypoint: ["/usr/local/bin/martin", "--config", "/config/config.yaml"]

-OR-

entrypoint:
   - "/usr/local/bin/martin"
   - "--config"
   - "/config/config1.yaml"

Is this a bug with Docker or a bug with the Martin setup. It seems others are using this setup and it works ok.

Running on a mac (os 14.6.1 on arm chip ) and docker version 27.2.0.

This is the docker-compose.yaml.

name: osm-maps-martin
services:
  db-source-martin:
    build:
      context: .
      dockerfile: docker/Dockerfile.postgis
    volumes:
      - ./container-data/database-data:/var/lib/postgresql/data
    ports:
      - 5432:5432
    env_file: ".env"
    environment:
      - POSTGRES_PORT
    restart: on-failure
    healthcheck:
      test: "PGPASSWORD=docker pg_isready -h 127.0.0.1 -U docker -d public"
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 1m
  martin:
    image: ghcr.io/maplibre/martin:latest
    command: ["--config", "/config/config.yaml"]
    volumes:
      - ./container-data/martin/config:/config
      - ./container-data/martin/tiles:/tiles
    ports:
      - 8080:3000
    env_file: ".env"
    environment:
      - DATABASE_URL=postgresql://docker:docker@db-source-martin/public
      - RUST_LOG=actix_web=info,martin=debug,tokio_postgres=debug
    restart: unless-stopped
    depends_on:
      - db-source-martin

If would be very nice to allow for the martin CLI args to be also placed into an .env file.

@jt-helsinki
Copy link
Author

Restart of Docker seems to have resolved this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant