ZeruLight / Erupe

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

Docker Compose cannot initiate DB container #129

Open Atsilut opened 1 month ago

Atsilut commented 1 month 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 month ago

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

stratic-dev commented 1 month 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 month 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 month 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