Create Dockerfile
Browse files- Dockerfile +77 -0
Dockerfile
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ============================================================
|
| 2 |
+
# n8n on Hugging Face Spaces (free tier) — port 7860
|
| 3 |
+
# PostgreSQL via Aiven avec SSL
|
| 4 |
+
# ============================================================
|
| 5 |
+
|
| 6 |
+
FROM n8nio/n8n:latest
|
| 7 |
+
|
| 8 |
+
USER root
|
| 9 |
+
|
| 10 |
+
# Dossier de données n8n + permissions
|
| 11 |
+
RUN mkdir -p /home/node/.n8n && \
|
| 12 |
+
chown -R node:node /home/node/.n8n
|
| 13 |
+
|
| 14 |
+
USER node
|
| 15 |
+
|
| 16 |
+
# ----------------------------------------------------------
|
| 17 |
+
# RÉSEAU — HF Spaces écoute uniquement sur 7860
|
| 18 |
+
# ----------------------------------------------------------
|
| 19 |
+
ENV PORT=7860
|
| 20 |
+
ENV N8N_PORT=7860
|
| 21 |
+
ENV N8N_HOST=0.0.0.0
|
| 22 |
+
ENV N8N_PROTOCOL=http
|
| 23 |
+
|
| 24 |
+
# ----------------------------------------------------------
|
| 25 |
+
# BASE DE DONNÉES — PostgreSQL Aiven (SSL obligatoire)
|
| 26 |
+
# ----------------------------------------------------------
|
| 27 |
+
ENV DB_TYPE=postgresdb
|
| 28 |
+
ENV DB_POSTGRESDB_HOST=n8n-n8n-vox.g.aivencloud.com
|
| 29 |
+
ENV DB_POSTGRESDB_PORT=21141
|
| 30 |
+
ENV DB_POSTGRESDB_DATABASE=defaultdb
|
| 31 |
+
ENV DB_POSTGRESDB_USER=avnadmin
|
| 32 |
+
ENV DB_POSTGRESDB_PASSWORD=AVNS_TAa_OQlklIzZxJbZfH6
|
| 33 |
+
ENV DB_POSTGRESDB_SCHEMA=public
|
| 34 |
+
ENV DB_POSTGRESDB_SSL_ENABLED=true
|
| 35 |
+
ENV DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED=false
|
| 36 |
+
|
| 37 |
+
# ----------------------------------------------------------
|
| 38 |
+
# SÉCURITÉ — clé de chiffrement stable (CHANGE CETTE VALEUR
|
| 39 |
+
# par une chaîne aléatoire fixe de 32+ chars, ex: openssl rand -hex 32)
|
| 40 |
+
# Sans cette variable, n8n régénère une clé à chaque restart
|
| 41 |
+
# et tes credentials stockés deviennent illisibles !
|
| 42 |
+
# ----------------------------------------------------------
|
| 43 |
+
ENV N8N_ENCRYPTION_KEY=remplace_par_une_vraie_cle_aleatoire_32chars
|
| 44 |
+
|
| 45 |
+
# ----------------------------------------------------------
|
| 46 |
+
# WEBHOOK — Remplace <ton-space> par ton vrai slug HF
|
| 47 |
+
# Format: https://<username>-<space-name>.hf.space
|
| 48 |
+
# ----------------------------------------------------------
|
| 49 |
+
ENV WEBHOOK_URL=https://ton-username-ton-space.hf.space/
|
| 50 |
+
|
| 51 |
+
# ----------------------------------------------------------
|
| 52 |
+
# COMPORTEMENT n8n
|
| 53 |
+
# ----------------------------------------------------------
|
| 54 |
+
# Désactive l'invite de création de compte au premier démarrage
|
| 55 |
+
ENV N8N_PERSONALIZATION_ENABLED=false
|
| 56 |
+
|
| 57 |
+
# Exécution dans le process principal (adapté aux envs contraints)
|
| 58 |
+
ENV EXECUTIONS_PROCESS=main
|
| 59 |
+
|
| 60 |
+
# Logs lisibles
|
| 61 |
+
ENV N8N_LOG_LEVEL=info
|
| 62 |
+
|
| 63 |
+
# Désactive la télémétrie (optionnel)
|
| 64 |
+
ENV N8N_DIAGNOSTICS_ENABLED=false
|
| 65 |
+
ENV N8N_VERSION_NOTIFICATIONS_ENABLED=false
|
| 66 |
+
|
| 67 |
+
# ----------------------------------------------------------
|
| 68 |
+
# PORT EXPOSÉ
|
| 69 |
+
# ----------------------------------------------------------
|
| 70 |
+
EXPOSE 7860
|
| 71 |
+
|
| 72 |
+
# ----------------------------------------------------------
|
| 73 |
+
# ENTRYPOINT — n8n:latest intègre déjà tini + le script
|
| 74 |
+
# On ne redéfinit PAS l'ENTRYPOINT pour éviter le conflit.
|
| 75 |
+
# Le CMD suffit pour passer les args à /docker-entrypoint.sh
|
| 76 |
+
# ----------------------------------------------------------
|
| 77 |
+
CMD ["start"]
|