Spaces:
Build error
Build error
File size: 1,222 Bytes
282c100 51c6910 282c100 f0b42e2 b9df4f3 51c6910 693d472 51c6910 b9df4f3 693d472 b9df4f3 0446496 282c100 0446496 b9df4f3 51c6910 693d472 4a473dd 51c6910 b9df4f3 |
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 |
FROM ubuntu:bionic
# Install necessary packages including xvfb and Nginx
RUN apt-get update && \
apt-get install -y \
xvfb \
nginx \
libxcursor1 \
bash && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy backend server files and set permissions
COPY build/ /app/build/
COPY etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY etc/nginx/conf.d /etc/nginx/conf.d
COPY webgl-build /usr/share/nginx/html
COPY html-page /usr/share/nginx/html-page
# Set permissions for directories and files
RUN chmod +x /app/build/tanks.x86_64 && \
mkdir -p /app/logs && \
mkdir -p /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body /var/lib/nginx/proxy && \
chown -R www-data:www-data /app /usr/share/nginx/html /usr/share/nginx/html-page /var/log/nginx /var/lib/nginx /var/cache/nginx && \
chmod 755 /var/log/nginx /var/lib/nginx /var/cache/nginx /var/lib/nginx/body /var/lib/nginx/proxy
# Copy and configure custom entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set workdir
WORKDIR /app/
# Expose necessary ports
EXPOSE 80 7777/udp 7778/tcp 7860
# Set the entrypoint to start the backend server and Nginx
ENTRYPOINT ["/entrypoint.sh"]
|