Initial commit - realms platform
This commit is contained in:
parent
c590ab6d18
commit
c717c3751c
234 changed files with 74103 additions and 15231 deletions
|
|
@ -1,17 +1,20 @@
|
|||
FROM openresty/openresty:alpine
|
||||
|
||||
# Install dependencies needed by opm
|
||||
RUN apk add --no-cache curl perl
|
||||
# Install dependencies needed by opm and thumbnail generation
|
||||
RUN apk add --no-cache curl perl ffmpeg
|
||||
|
||||
# Install lua-resty-http
|
||||
RUN opm get ledgetech/lua-resty-http
|
||||
|
||||
# Install lua-resty-jwt for edge JWT validation
|
||||
RUN opm get SkyLothar/lua-resty-jwt
|
||||
|
||||
# Copy configuration
|
||||
COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf
|
||||
COPY lua /usr/local/openresty/nginx/lua
|
||||
|
||||
# Create uploads directory structure with proper permissions
|
||||
RUN mkdir -p /app/uploads/avatars && \
|
||||
RUN mkdir -p /app/uploads/avatars /app/uploads/stickers /app/uploads/sticker-submissions && \
|
||||
chmod -R 755 /app/uploads
|
||||
|
||||
# Create nginx temp directories
|
||||
|
|
@ -22,7 +25,10 @@ RUN mkdir -p /var/cache/nginx/client_temp \
|
|||
/var/cache/nginx/scgi_temp && \
|
||||
chmod -R 755 /var/cache/nginx
|
||||
|
||||
# Create startup script inline to avoid Windows line ending issues
|
||||
RUN printf '#!/bin/sh\nmkdir -p /tmp/thumbs\nchmod 777 /tmp/thumbs\nexec /usr/local/openresty/bin/openresty -g "daemon off;"\n' > /start.sh && chmod +x /start.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
# Run as root but nginx will drop privileges after binding to ports
|
||||
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"]
|
||||
# Use startup script to ensure proper permissions on /tmp/thumbs
|
||||
CMD ["/start.sh"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue