[dyad] wrote 2 file(s)

This commit is contained in:
Michael committed 2025-11-06 13:56:17 +01:00
1 parent da8765ba81
commit d92c4563ec
2 files changed
+17 -6

No files matched your search

+11 -3
View File
@@ -1,15 +1,23 @@
FROM node:18-alpine
# Create app directory
# Create app directory and set permissions
WORKDIR /home/node/app
# Copy package files
# Install dependencies
COPY package*.json ./
RUN npm install
# Copy application files
# Copy app source
COPY . .
# Create directories with proper permissions
RUN mkdir -p /home/node/app/data /home/node/app/public/uploads && \
chown -R node:node /home/node/app && \
chmod -R 777 /home/node/app/data /home/node/app/public/uploads
# Switch to non-root user
USER node
# Expose port
EXPOSE 2222
+6 -3
View File
@@ -4,12 +4,11 @@ services:
notes-app:
build: .
container_name: notes-todo-app
user: "1000:1000" # Utilise l'UID et GID standard pour le premier utilisateur
ports:
- "2222:2222"
volumes:
- ./data:/home/node/app/data
- ./public/uploads:/home/node/app/public/uploads
- notes_data:/home/node/app/data
- notes_uploads:/home/node/app/public/uploads
environment:
- NODE_ENV=production
- JWT_SECRET=changeme_in_production
@@ -18,6 +17,10 @@ services:
networks:
- nginx_default
volumes:
notes_data:
notes_uploads:
networks:
nginx_default:
external: true