-
Notifications
You must be signed in to change notification settings - Fork 19
/
entrypoint.sh
40 lines (31 loc) · 739 Bytes
/
entrypoint.sh
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
38
39
40
#!/bin/bash
PUID=${PUID:-911}
PGID=${PGID:-911}
groupmod -o -g "$PGID" abc
usermod -o -u "$PUID" abc
echo "
-------------------------------------
User uid: $(id -u abc)
User gid: $(id -g abc)
-------------------------------------
"
# set permissions
chown -R abc:abc /logs
chown -R abc:abc /data
chown -R abc:abc /tmp
chown abc:abc /vods
# fonts
mkdir -p /var/cache/fontconfig
chown abc:abc /var/cache/fontconfig
su-exec abc fc-cache -f
# dotnet envs
export DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp
export FONTCONFIG_CACHE=/var/cache/fontconfig
su-exec abc /opt/app/ganymede-api &
api_pid=$!
# delay 5 seconds to wait for api to start
sleep 5
su-exec abc /opt/app/ganymede-worker &
worker_pid=$!
# wait
wait $api_pid $worker_pid