This commit is contained in:
evanpelle
2025-12-24 13:15:10 -08:00
parent 76beed8ab6
commit e500b83423
5 changed files with 35 additions and 41 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
}
},
{
"files": "Dockerfile",
"files": "*.Dockerfile",
"options": {
"plugins": []
}
+7 -35
View File
@@ -1,23 +1,5 @@
# Use an official Node runtime as the base image
FROM node:24-slim AS base
# Set the working directory in the container
WORKDIR /usr/src/app
FROM evanpelle/openfront-base:latest AS base
# Create dependency layer
FROM base AS dependencies
RUN apt-get update && apt-get install -y \
nginx \
git \
curl \
jq \
wget \
apache2-utils \
&& rm -rf /var/lib/apt/lists/*
# Update worker_connections in the existing nginx.conf
RUN sed -i 's/worker_connections [0-9]*/worker_connections 8192/' /etc/nginx/nginx.conf
FROM dependencies AS build
ARG GIT_COMMIT=unknown
ENV GIT_COMMIT="$GIT_COMMIT"
# Disable Husky hooks
@@ -39,7 +21,7 @@ FROM base AS prod-files
COPY . .
RUN rm -rf resources/maps
FROM dependencies AS npm-dependencies
FROM base AS npm-dependencies
# Disable Husky hooks
ENV HUSKY=0
ENV NPM_CONFIG_IGNORE_SCRIPTS=1
@@ -52,21 +34,11 @@ RUN npm ci --omit=dev
FROM base
ARG GIT_COMMIT=unknown
ENV GIT_COMMIT="$GIT_COMMIT"
RUN apt-get update && apt-get install -y \
nginx \
supervisor \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy installed packages from dependencies stage
RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb > cloudflared.deb \
&& dpkg -i cloudflared.deb \
&& rm cloudflared.deb
# Copy Nginx configuration and ensure it's used instead of the default
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -f /etc/nginx/sites-enabled/default
COPY --from=dependencies /etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=base /etc/nginx/nginx.conf /etc/nginx/nginx.conf
# Copy npm dependencies
COPY --from=npm-dependencies /usr/src/app/node_modules node_modules
@@ -76,7 +48,7 @@ COPY package.json .
COPY --from=prod-files /usr/src/app/ /usr/src/app/
# Copy frontend
COPY --from=build /usr/src/app/static static
COPY --from=base /usr/src/app/static static
# Setup supervisor configuration
RUN mkdir -p /var/log/supervisor
@@ -86,9 +58,9 @@ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY startup.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/startup.sh
RUN mkdir -p /etc/cloudflared && \
chown -R node:node /etc/cloudflared && \
chmod -R 755 /etc/cloudflared
RUN mkdir -p /etc/cloudflared \
&& chown -R node:node /etc/cloudflared \
&& chmod -R 755 /etc/cloudflared
# Set Cloudflared config directory to a volume mount location
ENV CF_CONFIG_PATH=/etc/cloudflared/config.yml
-4
View File
@@ -181,7 +181,6 @@ Feel free to ask questions in the translation Discord server!
To ensure code quality and project stability, we use a progressive contribution system:
1. **New Contributors**: Limited to UI improvements and small bug fixes only
- This helps you become familiar with the codebase
- UI changes are easier to review and less likely to break core functionality
- Small, focused PRs have a higher chance of being accepted
@@ -193,20 +192,17 @@ To ensure code quality and project stability, we use a progressive contribution
### How to Contribute Successfully
1. **Before Starting Work**:
- Open an issue describing what you want to contribute
- Wait for maintainer feedback before investing significant time
- Small improvements can proceed directly to PR stage
2. **Code Quality Requirements**:
- All code must be well-commented and follow existing style patterns
- New features should not break existing functionality
- Code should be thoroughly tested before submission
- All code changes in src/core _MUST_ be tested.
3. **Pull Request Process**:
- Keep PRs focused on a single feature or bug fix
- Include screenshots for UI changes
- Describe what testing you've performed
+24
View File
@@ -0,0 +1,24 @@
FROM node:24-slim
RUN apt-get update && apt-get install -y \
nginx \
supervisor \
git \
curl \
jq \
wget \
apache2-utils \
&& rm -rf /var/lib/apt/lists/*
RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb > cloudflared.deb \
&& dpkg -i cloudflared.deb \
&& rm cloudflared.deb
RUN sed -i 's/worker_connections [0-9]*/worker_connections 8192/' /etc/nginx/nginx.conf
RUN mkdir -p /var/log/supervisor /etc/cloudflared && \
chown -R node:node /etc/cloudflared && \
chmod -R 755 /etc/cloudflared
WORKDIR /usr/src/app
+3 -1
View File
@@ -481,7 +481,9 @@
></div>
<button
class="mt-4 w-full bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded"
onclick="document.getElementById('language-modal').classList.add('hidden')"
onclick="
document.getElementById('language-modal').classList.add('hidden')
"
>
Close
</button>