Skip to content

Commit 05b661d

Browse files
committed
Fixed PostgreSQL init files permissions and line endings
1 parent 6bed107 commit 05b661d

7 files changed

Lines changed: 4 additions & 32 deletions

File tree

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# PostgreSQL init script must use LF as line endings
2+
# Run `git ls-files --eol` to view applied attributes
3+
configuration/os2iot-postgresql/initdb/*.sh text eol=lf
4+
configuration/postgres/initdb/*.sh text eol=lf

README.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,6 @@ Docker doesn't have access to mount the volumes.
118118
Solution:
119119
On Windows: Go to Docker Desktop (tray icon) -> Settings -> Resources -> File Sharing -> Add the directory which is the parent directory of "OS2IoT-docker" or a parent of that. -> Apply & Restart
120120

121-
### error: database "os2iot-e2e" does not exist
122-
123-
```
124-
[ExceptionHandler] Unable
125-
to connect to the database. Retrying (1)...
126-
error: database "os2iot-e2e" does not exist
127-
at Parser.parseErrorMessage
128-
```
129-
130-
Cause:
131-
Database has not been setup correctly on local machine.
132-
133-
Solution:
134-
docker compose down --volumes
135-
dos2unix configuration/os2iot-postgresql/initdb/* # Run from git bash on Windows
136-
docker compose up
137-
138121
### error: Error: connect ETIMEDOUT xxx.xxx.xxx.xxx:xxxx at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
139122

140123
Cause:

Taskfile.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ tasks:
1717
desc: Run all setup steps (clone repos, fix line endings, generate certs)
1818
cmds:
1919
- task: setup:clone-repos
20-
- task: setup:fix-line-endings
2120
- task: setup:certs
2221
- task: setup:check
2322

@@ -40,20 +39,6 @@ tasks:
4039
echo "OS2IoT-frontend already exists"
4140
fi
4241
43-
setup:fix-line-endings:
44-
desc: Fix line endings on database init scripts (for Windows/cross-platform)
45-
silent: true
46-
cmds:
47-
- |
48-
if command -v dos2unix &> /dev/null; then
49-
dos2unix configuration/os2iot-postgresql/initdb/*.sh 2>/dev/null || true
50-
dos2unix configuration/postgres/initdb/*.sh 2>/dev/null || true
51-
dos2unix configuration/postgresql/initdb/*.sh 2>/dev/null || true
52-
echo "Line endings fixed"
53-
else
54-
echo "dos2unix not installed - skipping (install with: apt install dos2unix)"
55-
fi
56-
5742
setup:certs:
5843
desc: Generate MQTT broker certificates (CA and server)
5944
silent: true

configuration/os2iot-postgresql/initdb/001-init-os2iot.sh

100644100755
File mode changed.

configuration/os2iot-postgresql/initdb/002-init-os2iot-e2e.sh

100644100755
File mode changed.

configuration/postgres/initdb/001-init-chirpstack.sh

100644100755
File mode changed.

configuration/postgres/initdb/002-chirpstack_extensions.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)