Updated Dockerfiles and entrypoints

This commit is contained in:
FrozenFOXX
2020-09-01 21:42:38 -07:00
parent 04806dbe16
commit 93545c3aa1
5 changed files with 41 additions and 13 deletions

View File

@@ -54,9 +54,8 @@ COPY util/webtiles-init-player.sh /app/util/
COPY webserver/config.py /app/webserver/
COPY webserver/games.d/* /app/webserver/games.d/
# Adjustments for the container
RUN mkdir -p /data/rcs && \
mkdir -p /data/webserver
# Copy over the entrypoint
COPY scripts/entrypoint-webtiles.sh /app/entrypoint.sh
# Clean up unnecessary package lists
RUN rm -rf /var/lib/apt/lists/*
@@ -68,4 +67,4 @@ EXPOSE 8080
WORKDIR /app
# Launch WebTiles server
CMD [ "./webserver/server.py" ]
ENTRYPOINT [ "./entrypoint.sh" ]

View File

@@ -46,9 +46,8 @@ COPY --from=builder /app/ /app/
# Copy over custom configs
COPY settings/init.txt /app/settings/
# Adjustments for the container
RUN mkdir -p /data/rcs && \
mkdir -p /data/webserver
# COPY over the entrypoint
COPY scripts/entrypoint-tiles.sh /app/entrypoint.sh
# Clean up unnecessary package lists
RUN rm -rf /var/lib/apt/lists/*
@@ -59,5 +58,5 @@ EXPOSE 8080
# Set the WORKDIR
WORKDIR /app
# Launch WebTiles server
CMD [ "./webserver/server.py" ]
# Launch Tiles
ENTRYPOINT [ "./entrypoint.sh" ]

View File

@@ -54,9 +54,8 @@ COPY util/webtiles-init-player.sh /app/util/
COPY webserver/config.py /app/webserver/
COPY webserver/games.d/* /app/webserver/games.d/
# Adjustments for the container
RUN mkdir -p /data/rcs && \
mkdir -p /data/webserver
# Copy over the entrypoint
COPY scripts/entrypoint-webtiles.sh /app/entrypoint.sh
# Clean up unnecessary package lists
RUN rm -rf /var/lib/apt/lists/*
@@ -68,4 +67,4 @@ EXPOSE 8080
WORKDIR /app
# Launch WebTiles server
CMD [ "./webserver/server.py" ]
ENTRYPOINT [ "./entrypoint.sh" ]

12
scripts/entrypoint-tiles.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env ash
# Variables
APPDIR=${APPDIR:-"/app"}
DATA_DIR=${DATA_DIR:-"/data"}
# Functions
# Logic
cd ${APPDIR}
./webserver/server.py $@

19
scripts/entrypoint-webtiles.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env ash
# Variables
APPDIR=${APPDIR:-"/app"}
DATA_DIR=${DATA_DIR:-"/data"}
# Functions
## Create server directories if they do not exist
create_server_dirs()
{
mkdir -p ${DATA_DIR}/rcs
mkdir -p ${DATA_DIR}/webserver
}
# Logic
cd ${APPDIR}
./webserver/server.py $@