mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
support nginx gateway on docker
This commit is contained in:
parent
57c4542709
commit
b009c0fec3
@ -17,6 +17,25 @@ WORKDIR /comty-server
|
|||||||
# Copy Files
|
# Copy Files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Support for nginx gateway
|
||||||
|
ENV NGINX_VERSION=1.26.3
|
||||||
|
ENV NGINX_BINARIES_URL=https://jirutka.github.io/nginx-binaries
|
||||||
|
RUN ARCH="$(dpkg --print-architecture)" && \
|
||||||
|
if [ "$ARCH" = "arm64" ]; then \
|
||||||
|
NGINX_ARCH="aarch64"; \
|
||||||
|
elif [ "$ARCH" = "amd64" ]; then \
|
||||||
|
NGINX_ARCH="x86_64"; \
|
||||||
|
else \
|
||||||
|
echo "Unsupported architecture: $ARCH" && \
|
||||||
|
exit 1; \
|
||||||
|
fi && \
|
||||||
|
NGINX_BINARY_URL="${NGINX_BINARIES_URL}/nginx-${NGINX_VERSION}-${NGINX_ARCH}-linux" && \
|
||||||
|
curl -L "${NGINX_BINARY_URL}" -o /comty-server/nginx-bin && \
|
||||||
|
chmod +x /comty-server/nginx-bin
|
||||||
|
|
||||||
|
# Check nginx version
|
||||||
|
RUN /comty-server/nginx-bin -v
|
||||||
|
|
||||||
# Fix permissions
|
# Fix permissions
|
||||||
RUN chmod -R 777 /comty-server
|
RUN chmod -R 777 /comty-server
|
||||||
RUN chown -R node:node /comty-server
|
RUN chown -R node:node /comty-server
|
||||||
@ -29,5 +48,5 @@ RUN npm install --omit=dev
|
|||||||
#RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
#RUN npm rebuild @tensorflow/tfjs-node --build-from-source
|
||||||
|
|
||||||
# Start server
|
# Start server
|
||||||
RUN export NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
CMD ["npm", "run", "start:prod"]
|
CMD ["npm", "run", "start:prod"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user