forked from dullage/flatnotes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
37 lines (30 loc) · 921 Bytes
/
entrypoint.sh
File metadata and controls
37 lines (30 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -e
USERNAME=flatnotes
echo Setting up user and group...
addgroup \
--gid ${PGID} \
${USERNAME} \
|| echo "Group '${PGID}' already exists."
adduser \
--disabled-password \
--gecos "" \
--uid ${PUID} \
--gid ${PGID} \
${USERNAME} \
|| echo "User '${PUID}' already exists."
echo Setting file permissions...
chown -R ${PUID}:${PGID} ${FLATNOTES_PATH}
echo "WARNING: Breaking changes introduced in version 3.x:"
echo " - The port flatnotes uses inside the Docker container has been changed to 8080 (previously 80)."
echo " - To accompany the above change, support for the PORT environment variable has been removed."
echo " - The note directory inside the Docker container has moved from /app/data to simply /data."
echo Starting flatnotes...
cd ${APP_PATH}
exec gosu ${PUID}:${GUID} \
python -m \
uvicorn \
main:app \
--app-dir flatnotes \
--host 0.0.0.0 \
--port 8080