update
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
# Resource Provider (Node.js + Nginx) Dockerfile
|
||||
# Resource Provider (Node.js) Dockerfile
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install nginx
|
||||
RUN apk add --no-cache nginx
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
@@ -18,16 +15,9 @@ RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY . .
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
# Just fix nginx permissions - let nginx create what it needs
|
||||
RUN chown -R nginx:nginx /var/lib/nginx /var/log/nginx
|
||||
# Expose port
|
||||
EXPOSE 3000
|
||||
|
||||
# Create static files directory
|
||||
RUN mkdir -p /static-files
|
||||
|
||||
# Expose ports
|
||||
EXPOSE 3000 80
|
||||
|
||||
# Start both nginx and node
|
||||
CMD ["sh", "-c", "nginx && node server.js"]
|
||||
# Start the Node.js application
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /static-files;
|
||||
|
||||
# Serve static files
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# Set proper content type for markdown files
|
||||
location ~* \.md$ {
|
||||
add_header Content-Type "text/markdown; charset=utf-8";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user