mirror of
https://github.com/R0m1k3/noteflow.git
synced 2026-10-12 01:39:47 +02:00
[dyad] wrote 2 file(s)
This commit is contained in:
1 parent
20edfef8bb
commit
81f60c7965
2 files changed
+14
-5
No files matched your search
+14
-2
@@ -15,8 +15,20 @@ RUN mkdir -p /app/data /app/public/uploads && \
|
||||
chmod -R 755 /app && \
|
||||
chmod -R 777 /app/data /app/public/uploads
|
||||
|
||||
# Create an entrypoint script
|
||||
RUN echo '#!/bin/sh\n\
|
||||
mkdir -p /app/data\n\
|
||||
mkdir -p /app/public/uploads\n\
|
||||
chmod -R 777 /app/data\n\
|
||||
chmod -R 777 /app/public/uploads\n\
|
||||
exec node server.js' > /app/docker-entrypoint.sh && \
|
||||
chmod +x /app/docker-entrypoint.sh
|
||||
|
||||
# Switch to non-root user
|
||||
USER node
|
||||
|
||||
# Expose port
|
||||
EXPOSE 2222
|
||||
|
||||
# Start the app
|
||||
CMD ["node", "server.js"]
|
||||
# Use the entrypoint script
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
@@ -13,9 +13,6 @@ services:
|
||||
- NODE_ENV=production
|
||||
- JWT_SECRET=changeme_in_production
|
||||
- PORT=2222
|
||||
- UID=1000
|
||||
- GID=1000
|
||||
user: "1000:1000" # Utiliser l'utilisateur node
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- nginx_default
|
||||
|
||||
Reference in new issue
Block a user