Config docker
This commit is contained in:
4
.env.docker
Normal file
4
.env.docker
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Variables pour l'interpolation docker compose (${POSTGRES_*})
|
||||||
|
POSTGRES_DB=jooldb
|
||||||
|
POSTGRES_USER=jooluser
|
||||||
|
POSTGRES_PASSWORD=localdev_password
|
||||||
@@ -7,11 +7,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Dépendances système minimales
|
# psycopg2-binary : pas besoin de gcc/libpq-dev (économise RAM/disque au build)
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
libpq-dev \
|
|
||||||
gcc \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Dépendances Python
|
# Dépendances Python
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ EMAIL_HOST_USER = env('EMAIL_HOST_USER', default='')
|
|||||||
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', default='')
|
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', default='')
|
||||||
|
|
||||||
# ── HTTPS / cookies ───────────────────────────────────────
|
# ── HTTPS / cookies ───────────────────────────────────────
|
||||||
SECURE_SSL_REDIRECT = True
|
SECURE_SSL_REDIRECT = env.bool('SECURE_SSL_REDIRECT', default=True)
|
||||||
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') # derrière nginx
|
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') # derrière nginx
|
||||||
|
|
||||||
SESSION_COOKIE_SECURE = True
|
SESSION_COOKIE_SECURE = True
|
||||||
|
|||||||
20
docker-compose.local.yml
Normal file
20
docker-compose.local.yml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Usage local :
|
||||||
|
# docker compose --env-file .env.prod -f docker-compose.yml -f docker-compose.local.yml up --build
|
||||||
|
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
environment:
|
||||||
|
ALLOWED_HOSTS: localhost,127.0.0.1,web
|
||||||
|
SECURE_SSL_REDIRECT: "false"
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
ports:
|
||||||
|
- "8888:80"
|
||||||
|
volumes:
|
||||||
|
- ./nginx/nginx.local.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
|
- static_volume:/app/staticfiles:ro
|
||||||
|
- media_volume:/app/media:ro
|
||||||
|
|
||||||
|
certbot:
|
||||||
|
profiles:
|
||||||
|
- production
|
||||||
@@ -30,12 +30,8 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
command: >
|
command: >
|
||||||
sh -c "python manage.py migrate --noinput &&
|
sh -c "python manage.py migrate --noinput &&
|
||||||
gunicorn config.wsgi:application
|
gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3
|
||||||
--bind 0.0.0.0:8000
|
--timeout 60 --access-logfile - --error-logfile -"
|
||||||
--workers 3
|
|
||||||
--timeout 60
|
|
||||||
--access-logfile -
|
|
||||||
--error-logfile -"
|
|
||||||
|
|
||||||
# ── Nginx (reverse proxy + static files) ───────────────
|
# ── Nginx (reverse proxy + static files) ───────────────
|
||||||
nginx:
|
nginx:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ limit_req_zone $binary_remote_addr zone=forms:10m rate=2r/m;
|
|||||||
# ── HTTP → HTTPS redirect ──────────────────────────────────
|
# ── HTTP → HTTPS redirect ──────────────────────────────────
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name jool-int.com www.jool-int.com;
|
server_name jool-international.com www.jool-international.com;
|
||||||
|
|
||||||
# Let's Encrypt challenge
|
# Let's Encrypt challenge
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
@@ -27,11 +27,11 @@ server {
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
http2 on;
|
http2 on;
|
||||||
server_name jool-int.com www.jool-int.com;
|
server_name jool-international.com www.jool-international.com;
|
||||||
|
|
||||||
# ── SSL ────────────────────────────────────────────────
|
# ── SSL ────────────────────────────────────────────────
|
||||||
ssl_certificate /etc/letsencrypt/live/jool-int.com/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/jool-international.com/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/jool-int.com/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/jool-international.com/privkey.pem;
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
|
||||||
|
|
||||||
|
|||||||
37
nginx/nginx.local.conf
Normal file
37
nginx/nginx.local.conf
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
upstream django {
|
||||||
|
server web:8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name localhost 127.0.0.1;
|
||||||
|
|
||||||
|
client_max_body_size 10M;
|
||||||
|
|
||||||
|
location /static/ {
|
||||||
|
alias /app/staticfiles/;
|
||||||
|
expires 30d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /media/careers/cvs/ {
|
||||||
|
deny all;
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /media/ {
|
||||||
|
alias /app/media/;
|
||||||
|
expires 7d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://django;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_read_timeout 60s;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,14 +11,14 @@
|
|||||||
<!-- ── Meta description ── -->
|
<!-- ── Meta description ── -->
|
||||||
<meta name="description" content="{% block meta_description %}Jool International développe des solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.{% endblock %}">
|
<meta name="description" content="{% block meta_description %}Jool International développe des solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.{% endblock %}">
|
||||||
<meta name="robots" content="{% block meta_robots %}index, follow{% endblock %}">
|
<meta name="robots" content="{% block meta_robots %}index, follow{% endblock %}">
|
||||||
<link rel="canonical" href="{% block canonical %}https://jool-int.com{{ request.path }}{% endblock %}">
|
<link rel="canonical" href="{% block canonical %}https://jool-international.com{{ request.path }}{% endblock %}">
|
||||||
|
|
||||||
<!-- ── Open Graph (partage réseaux sociaux) ── -->
|
<!-- ── Open Graph (partage réseaux sociaux) ── -->
|
||||||
<meta property="og:type" content="{% block og_type %}website{% endblock %}">
|
<meta property="og:type" content="{% block og_type %}website{% endblock %}">
|
||||||
<meta property="og:site_name" content="Jool International">
|
<meta property="og:site_name" content="Jool International">
|
||||||
<meta property="og:title" content="{% block og_title %}{% block title_plain %}Jool International — AgriTech Intelligence pour l'Afrique{% endblock %}{% endblock %}">
|
<meta property="og:title" content="{% block og_title %}{% block title_plain %}Jool International — AgriTech Intelligence pour l'Afrique{% endblock %}{% endblock %}">
|
||||||
<meta property="og:description" content="{% block og_description %}Jool International développe des solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.{% endblock %}">
|
<meta property="og:description" content="{% block og_description %}Jool International développe des solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.{% endblock %}">
|
||||||
<meta property="og:url" content="https://jool-int.com{{ request.path }}">
|
<meta property="og:url" content="https://jool-international.com{{ request.path }}">
|
||||||
<meta property="og:image" content="{% block og_image %}{% static 'img/og-cover.jpg' %}{% endblock %}">
|
<meta property="og:image" content="{% block og_image %}{% static 'img/og-cover.jpg' %}{% endblock %}">
|
||||||
<meta property="og:locale" content="fr_FR">
|
<meta property="og:locale" content="fr_FR">
|
||||||
|
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com",
|
"url": "https://jool-international.com",
|
||||||
"logo": "https://jool-int.com{% static 'img/logo.png' %}",
|
"logo": "https://jool-international.com{% static 'img/logo.png' %}",
|
||||||
"description": "Solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.",
|
"description": "Solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.",
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
|
|||||||
@@ -17,12 +17,12 @@
|
|||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "AboutPage",
|
"@type": "AboutPage",
|
||||||
"name": "À propos de Jool International",
|
"name": "À propos de Jool International",
|
||||||
"url": "https://jool-int.com/a-propos/",
|
"url": "https://jool-international.com/a-propos/",
|
||||||
"description": "Jool International est une entreprise AgriTech basée à Abidjan qui développe des solutions d'intelligence artificielle, de télédétection et de digitalisation pour l'agriculture africaine.",
|
"description": "Jool International est une entreprise AgriTech basée à Abidjan qui développe des solutions d'intelligence artificielle, de télédétection et de digitalisation pour l'agriculture africaine.",
|
||||||
"publisher": {
|
"publisher": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com",
|
"url": "https://jool-international.com",
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
"addressLocality": "Abidjan",
|
"addressLocality": "Abidjan",
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com",
|
"url": "https://jool-international.com",
|
||||||
"logo": "https://jool-int.com/static/img/logo.png",
|
"logo": "https://jool-international.com/static/img/logo.png",
|
||||||
"description": "Solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.",
|
"description": "Solutions AgriTech pour l'agriculture africaine : analyse satellitaire IA, cartographie drone et digitalisation des producteurs.",
|
||||||
"address": {
|
"address": {
|
||||||
"@type": "PostalAddress",
|
"@type": "PostalAddress",
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
"name": "Jool ID",
|
"name": "Jool ID",
|
||||||
"applicationCategory": "AgricultureApplication",
|
"applicationCategory": "AgricultureApplication",
|
||||||
"operatingSystem": "Web",
|
"operatingSystem": "Web",
|
||||||
"url": "https://jool-int.com/joolid/",
|
"url": "https://jool-international.com/joolid/",
|
||||||
"description": "Plateforme de digitalisation des producteurs agricoles : profils vérifiés, parcelles géolocalisées, traçabilité des intrants et pilotage de programme à grande échelle.",
|
"description": "Plateforme de digitalisation des producteurs agricoles : profils vérifiés, parcelles géolocalisées, traçabilité des intrants et pilotage de programme à grande échelle.",
|
||||||
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
||||||
"provider": {
|
"provider": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com"
|
"url": "https://jool-international.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
"name": "KIRIQ AI",
|
"name": "KIRIQ AI",
|
||||||
"applicationCategory": "AgricultureApplication",
|
"applicationCategory": "AgricultureApplication",
|
||||||
"operatingSystem": "Web",
|
"operatingSystem": "Web",
|
||||||
"url": "https://jool-int.com/kiriq/",
|
"url": "https://jool-international.com/kiriq/",
|
||||||
"description": "Solution d'analyse satellitaire et d'intelligence artificielle pour le diagnostic agricole : détection de maladies, suivi NDVI, stress hydrique et aide à la décision.",
|
"description": "Solution d'analyse satellitaire et d'intelligence artificielle pour le diagnostic agricole : détection de maladies, suivi NDVI, stress hydrique et aide à la décision.",
|
||||||
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
||||||
"provider": {
|
"provider": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com"
|
"url": "https://jool-international.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
"name": "Jool Monitor",
|
"name": "Jool Monitor",
|
||||||
"applicationCategory": "AgricultureApplication",
|
"applicationCategory": "AgricultureApplication",
|
||||||
"operatingSystem": "Web",
|
"operatingSystem": "Web",
|
||||||
"url": "https://jool-int.com/monitor/",
|
"url": "https://jool-international.com/monitor/",
|
||||||
"description": "Solution de cartographie drone pour l'agriculture : orthomosaïques, comptage intelligent, modèles 3D et suivi visuel continu des exploitations agricoles.",
|
"description": "Solution de cartographie drone pour l'agriculture : orthomosaïques, comptage intelligent, modèles 3D et suivi visuel continu des exploitations agricoles.",
|
||||||
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
"offers": { "@type": "Offer", "priceCurrency": "XOF" },
|
||||||
"provider": {
|
"provider": {
|
||||||
"@type": "Organization",
|
"@type": "Organization",
|
||||||
"name": "Jool International",
|
"name": "Jool International",
|
||||||
"url": "https://jool-int.com"
|
"url": "https://jool-international.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ Allow: /
|
|||||||
Disallow: /admin/
|
Disallow: /admin/
|
||||||
Disallow: /media/careers/cvs/
|
Disallow: /media/careers/cvs/
|
||||||
|
|
||||||
Sitemap: https://jool-int.com/sitemap.xml
|
Sitemap: https://jool-international.com/sitemap.xml
|
||||||
|
|||||||
@@ -2,31 +2,31 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://jool-int.com/</loc>
|
<loc>https://jool-international.com/</loc>
|
||||||
<changefreq>weekly</changefreq>
|
<changefreq>weekly</changefreq>
|
||||||
<priority>1.0</priority>
|
<priority>1.0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://jool-int.com/a-propos/</loc>
|
<loc>https://jool-international.com/a-propos/</loc>
|
||||||
<changefreq>monthly</changefreq>
|
<changefreq>monthly</changefreq>
|
||||||
<priority>0.8</priority>
|
<priority>0.8</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://jool-int.com/kiriq/</loc>
|
<loc>https://jool-international.com/kiriq/</loc>
|
||||||
<changefreq>monthly</changefreq>
|
<changefreq>monthly</changefreq>
|
||||||
<priority>0.9</priority>
|
<priority>0.9</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://jool-int.com/monitor/</loc>
|
<loc>https://jool-international.com/monitor/</loc>
|
||||||
<changefreq>monthly</changefreq>
|
<changefreq>monthly</changefreq>
|
||||||
<priority>0.9</priority>
|
<priority>0.9</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://jool-int.com/joolid/</loc>
|
<loc>https://jool-international.com/joolid/</loc>
|
||||||
<changefreq>monthly</changefreq>
|
<changefreq>monthly</changefreq>
|
||||||
<priority>0.9</priority>
|
<priority>0.9</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|||||||
Reference in New Issue
Block a user