ZeruLight / Erupe

Monster Hunter Frontier Server Emulator
https://discord.gg/DnwcpXM488
MIT License
190 stars 49 forks source link

Docker Compose cannot initiate DB container #129

Open Atsilut opened 1 week ago

Atsilut commented 1 week ago

Description: I cloned main branch and configured all db connection settings, still can't make tables in DB container So I figured out tables are supposed to be made, but they weren't. I think /docker/init/setup.sh has wrong direction to init.sql. (I checked files directory in db container and find this problem) Or maybe I'm just an idiot.

Reproduction Steps: Fix INIT bash script (/docker/init/setup.sh) from $ pg_restore --username="$POSTGRES_USER" --dbname="$POSTGRES_DB" --verbose /schemas/init.sql to $ pg_restore --username="$POSTGRES_USER" --dbname="$POSTGRES_DB" --verbose ./schemas/init.sql

Screenshots

Additional context

stratic-dev commented 1 week ago

You're setup.sh is saved as CRLF it needs to be saved as LF.

stratic-dev commented 1 week ago

Open in VSCODE or something look in the bottom right corner and click where it says CRLF and then change it to LF image

Atsilut commented 1 week ago

123 I already read that problem in README.MD and my script file is actually fine with that and yet, works well when I correct the directory

Atsilut commented 1 week ago

1234 See the docker db container's file directory. setup.sh cannot find init.sql with your coded path. Because there is no schemas folder nor init.sql in docker-entrypoint-initdb.d. So it should go back and find /schemas/ directory