Skip to content

[Bug] Docker missing mount warning doesn't respect *_DIR Environment Variables #387

@pbronez

Description

@pbronez

Gokapi Version

v2.2.4

Operating System / Deployment

Docker (Official Image)

Storage Backend

S3 Compatible (AWS, Minio, etc.)

Database

SQLite

Steps to Reproduce

  1. Set *_DIR environment variables to non-standard locations

1.1 set GOKAPI_CONFIG_DIR to /mnt_vol/config

1.2 set and GOKAPI_DATA_DIR to /mnt_vol/data

  1. Mount a volume to /mnt_vol

  2. Start GokAPI image for the first time

3.1. Open /setup
3.2 get redirected to /setup/start

  1. See error messages:
 Warning: It appears that your /app/data directory has not been mounted as a volume. This will result in complete data loss once you update or rebuild this container!

Warning: It appears that your /app/config directory has not been mounted as a volume. This will result in complete data loss once you update or rebuild this container! 

Additional Context

Warnings are correct that /app/data and /app/config are not mounted. However there ARE mounted config and app directories, specified by the environment variables, so the application is thowing a big warning when everything is fine.

I'm deploying gokapi on Railway. I can only attach one volume per service (container) so I need to get /config and /data into the same mount.

I can't just mount app/ because gokapi looks for a few baked-in files that live at that level. Mounting an empty volume prevents the service from running.

Relevant Logs

2026-04-03T02:56:41.866718297Z [inf]  
2026-04-03T02:56:41.866726795Z [inf]  ██████   ██████   ██   ██  █████  ██████  ██ 
2026-04-03T02:56:41.866734055Z [inf]  ██       ██    ██ ██  ██  ██   ██ ██   ██ ██ 
2026-04-03T02:56:41.866742310Z [inf]  ██   ███ ██    ██ █████   ███████ ██████  ██ 
2026-04-03T02:56:41.866749147Z [inf]  ██    ██ ██    ██ ██  ██  ██   ██ ██      ██ 
2026-04-03T02:56:41.866756245Z [inf]   ██████   ██████  ██   ██ ██   ██ ██      ██ 
2026-04-03T02:56:41.866763615Z [inf]                                               
2026-04-03T02:56:41.866770277Z [inf]  Gokapi v2.2.4 starting
2026-04-03T02:56:41.866777549Z [inf]  Please open http://127.0.0.1:53842/setup to setup Gokapi.
2026-04-03T02:56:42.126614518Z [inf]  Starting Container

Before submitting

  • I have removed sensitive information (API keys, passwords) from my logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions