Skip to content

Commit efa695c

Browse files
committed
Simplify entrypoints.
1 parent 1f1a81e commit efa695c

File tree

5 files changed

+1
-121
lines changed

5 files changed

+1
-121
lines changed

.github/workflows/build-and-push-docker-images.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: docker/[email protected]
4141
with:
4242
build-args: VERSION=${{ env.VERSION }}
43-
file: ./docker/Eps.dockerfile
43+
file: ./docker/Hyper.dockerfile
4444
tags: ${{ steps.meta_hyper.outputs.tags }}
4545
push: true
4646
labels: |

.scripts/entrypoint-hyper.sh

-40
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
11
#!/bin/sh
2-
3-
if [[ -z "${MOUNT_POINTS}" ]]
4-
then
5-
echo "The environment variable MOUNT_POINTS can be set to a comma separated list of the mount points in the container. Use default now."
6-
READ_MOUNT_POINTS="/config,/tls,/app/settings"
7-
WRITE_MOUNT_POINTS=""
8-
MOUNT_POINTS=$READ_MOUNT_POINTS,$WRITE_MOUNT_POINTS
9-
fi
10-
11-
echo "MOUNT_POINTS is set to \"${MOUNT_POINTS}\""
12-
echo "READ_MOUNT_POINTS is set to \"${READ_MOUNT_POINTS}\""
13-
echo "WRITE_MOUNT_POINTS is set to \"${WRITE_MOUNT_POINTS}\""
14-
15-
for point in ${MOUNT_POINTS//,/ }
16-
do
17-
if [ ! -d ${point} ]
18-
then
19-
echo "Skip non-existent directory: \"${point}\""
20-
continue
21-
fi
22-
23-
echo "chown is made for \"${point}\""
24-
chown -R hyper:hyper ${point}
25-
26-
echo "chmod u+r is made for \"${point}\""
27-
chmod -R u+r ${point}
28-
done
29-
30-
for point in ${WRITE_MOUNT_POINTS//,/ }
31-
do
32-
if [ ! -d ${point} ]
33-
then
34-
continue
35-
fi
36-
37-
echo "chmod u+w is made for \"${point}\""
38-
chmod -R u+w ${point}
39-
done
40-
412
echo "Execute hyper with user hyper"
42-
433
exec su hyper -c "./hyper $*"

.scripts/entrypoint-proxy.sh

-40
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
11
#!/bin/sh
2-
3-
if [[ -z "${MOUNT_POINTS}" ]]
4-
then
5-
echo "The environment variable MOUNT_POINTS can be set to a comma separated list of the mount points in the container. Use default now."
6-
READ_MOUNT_POINTS="/config,/tls,/app/settings"
7-
WRITE_MOUNT_POINTS="/storage,/app/db,/tmp"
8-
MOUNT_POINTS=$READ_MOUNT_POINTS,$WRITE_MOUNT_POINTS
9-
fi
10-
11-
echo "MOUNT_POINTS is set to \"${MOUNT_POINTS}\""
12-
echo "READ_MOUNT_POINTS is set to \"${READ_MOUNT_POINTS}\""
13-
echo "WRITE_MOUNT_POINTS is set to \"${WRITE_MOUNT_POINTS}\""
14-
15-
for point in ${MOUNT_POINTS//,/ }
16-
do
17-
if [ ! -d ${point} ]
18-
then
19-
echo "Skip non-existent directory: \"${point}\""
20-
continue
21-
fi
22-
23-
echo "chown is made for \"${point}\""
24-
chown -R hyper:hyper ${point}
25-
26-
echo "chmod u+r is made for \"${point}\""
27-
chmod -R u+r ${point}
28-
done
29-
30-
for point in ${WRITE_MOUNT_POINTS//,/ }
31-
do
32-
if [ ! -d ${point} ]
33-
then
34-
continue
35-
fi
36-
37-
echo "chmod u+w is made for \"${point}\""
38-
chmod -R u+w ${point}
39-
done
40-
412
echo "Execute proxy with user hyper"
42-
433
exec su hyper -c "./proxy $*"

.scripts/entrypoint-sd.sh

-40
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,3 @@
11
#!/bin/sh
2-
3-
if [[ -z "${MOUNT_POINTS}" ]]
4-
then
5-
echo "The environment variable MOUNT_POINTS can be set to a comma separated list of the mount points in the container. Use default now."
6-
READ_MOUNT_POINTS="/config,/tls,/app/settings"
7-
WRITE_MOUNT_POINTS="/storage,/app/db,/tmp"
8-
MOUNT_POINTS=$READ_MOUNT_POINTS,$WRITE_MOUNT_POINTS
9-
fi
10-
11-
echo "MOUNT_POINTS is set to \"${MOUNT_POINTS}\""
12-
echo "READ_MOUNT_POINTS is set to \"${READ_MOUNT_POINTS}\""
13-
echo "WRITE_MOUNT_POINTS is set to \"${WRITE_MOUNT_POINTS}\""
14-
15-
for point in ${MOUNT_POINTS//,/ }
16-
do
17-
if [ ! -d ${point} ]
18-
then
19-
echo "Skip non-existent directory: \"${point}\""
20-
continue
21-
fi
22-
23-
echo "chown is made for \"${point}\""
24-
chown -R hyper:hyper ${point}
25-
26-
echo "chmod u+r is made for \"${point}\""
27-
chmod -R u+r ${point}
28-
done
29-
30-
for point in ${WRITE_MOUNT_POINTS//,/ }
31-
do
32-
if [ ! -d ${point} ]
33-
then
34-
continue
35-
fi
36-
37-
echo "chmod u+w is made for \"${point}\""
38-
chmod -R u+w ${point}
39-
done
40-
412
echo "Execute sd with user hyper"
42-
433
exec su hyper -c "./sd $*"
File renamed without changes.

0 commit comments

Comments
 (0)