feat: add bindable working dir /usr/bin/app

working directory can now be bound to user host machine
This commit is contained in:
2025-02-23 06:03:13 -07:00
parent 71027041c8
commit 6228c9ec08
5 changed files with 19 additions and 9 deletions

View File

@@ -19,7 +19,6 @@
# arm64 docker buildx build --no-cache --pull --build-arg VERSION=1.0.0 --build-arg BUILDDATE=20250218 -t tvapp2:latest -t tvapp2:1.0.0 --platform=linux/arm64 --output type=docker --output type=docker .
# #
FROM ghcr.io/aetherinox/alpine-base:3.20-amd64
# #
@@ -57,6 +56,8 @@ ENV WEB_IP="0.0.0.0"
ENV WEB_PORT=4124
ENV NODE_VERSION=18.20.5
ENV YARN_VERSION=1.22.22
ENV INSTALL_DIR=/usr/src/app
ENV WORKING_DIR=/usr/bin/app
# #
# Install
@@ -86,7 +87,7 @@ COPY root/ /
# set work directory
# #
WORKDIR /usr/src/app
WORKDIR ${INSTALL_DIR}
# #
# copy tvapp2 project to workdir
@@ -95,10 +96,10 @@ WORKDIR /usr/src/app
COPY tvapp2/ ./
# #
# install node (production)
# set work dir to built app
# #
RUN npm install --only=production
WORKDIR ${WORKING_DIR}
# #
# Ports and volumes

View File

@@ -56,6 +56,7 @@ ENV WEB_IP="0.0.0.0"
ENV WEB_PORT=4124
ENV NODE_VERSION=18.20.5
ENV YARN_VERSION=1.22.22
ENV WORKING_DIR=/usr/bin/app
# #
# Install
@@ -94,10 +95,10 @@ WORKDIR /usr/src/app
COPY tvapp2/ ./
# #
# install node (production)
# set work dir to built app
# #
RUN npm install --only=production
WORKDIR ${WORKING_DIR}
# #
# Ports and volumes

View File

@@ -1,8 +1,7 @@
services:
tvapp2:
container_name: ${TVAPP2CONTAINER_NAME:-tvapp2}
# image: ghcr.io/aetherinox/tvapp2:latest
container_name: tvapp2
image: tvapp2:latest
hostname: tvapp2
environment:
@@ -12,6 +11,7 @@ services:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ./config:/config
- ./data:/usr/bin/app
ulimits:
memlock:
soft: -1

View File

@@ -27,6 +27,7 @@ fi
echo " Port(s) $(echo $WEB_PORT)"
echo " Gateway $(echo $IP_GATEWAY)"
echo " Web Server $(echo $IP_CONTAINER:$WEB_PORT)"
echo " App Folder $(echo $WORKING_DIR)"
echo ""
echo '──────────────────────────────────────────────────────────────────────────────────────────'

View File

@@ -1,3 +1,10 @@
#!/usr/bin/with-contenv sh
cd "/usr/src/app"
# #
# install and startup for tvapp2
# #
cp -r ${INSTALL_DIR} ${WORKING_DIR}
rm -rf ${INSTALL_DIR}/*
cd ${WORKING_DIR}
npm start