basecamp / kamal

Deploy web apps anywhere.
https://kamal-deploy.org
MIT License
9.39k stars 359 forks source link

Add Support for setting shm_size for accessories #766

Closed SamuelAierizer closed 2 months ago

SamuelAierizer commented 2 months ago

Basically, I would like to increase the size of the /dev/shm in the postgres docker container.

This is what I added to my deploy.yml

accessories:
  db:
    image: postgres:16
    host: ...
    restart: always
    env:
      ...
    files:
      - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
    directories:
      - data:/var/lib/postgresql/data
    options:
      network: "private"
      shm_size: 2gb  <----- this here

When running kamal accessory reboot db I get the following errors:

docker stderr: unknown flag: --shm_size

From the command that get's run on the server I see the following: docker run ... --network "private" --shm_size "2gb" postgres:16.

Can someone potentially help me out?

morgoth commented 2 months ago

Did you try specyfing it in yaml as shm-size: 2gb?

morgoth commented 2 months ago

@SamuelAierizer do you still have the issue with the suggestion above?