Skip to content

Commit a12af9d

Browse files
Merge pull request #620 from ansforge/feat/annuaire-front-clean
feat(landing): ajout de la page annuaire (acteurs en production)
2 parents 1dcf7da + b246c86 commit a12af9d

21 files changed

Lines changed: 3042 additions & 1191 deletions

web/landing/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,21 @@ COPY nginx.conf /usr/share/nginx/html/nginx.conf
1010
# Copy custom server config to use port 8080
1111
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
1212

13+
# Copy the entrypoint script that generates env-config.js at container startup
14+
COPY docker-entrypoint.sh /docker-entrypoint.sh
15+
RUN chmod +x /docker-entrypoint.sh
16+
1317
# Fix permissions for nginx cache directory when running with non-root user
1418
RUN mkdir -p /var/cache/nginx && chown -R nginx:nginx /var/cache/nginx /usr/share/nginx/html
1519

1620
# Expose port 8080 to allow incoming traffic
1721
EXPOSE 8080
1822

19-
# Start the nginx web server with custom config (with updated pid path)
20-
CMD ["nginx", "-c", "/usr/share/nginx/html/nginx.conf", "-g", "daemon off;"]
21-
2223
# Run as non-root user for better security
23-
USER nginx
24+
USER nginx
25+
26+
# Run the entrypoint script before starting nginx
27+
ENTRYPOINT ["/docker-entrypoint.sh"]
28+
29+
# Start the nginx web server with custom config (with updated pid path)
30+
CMD ["nginx", "-c", "/usr/share/nginx/html/nginx.conf", "-g", "daemon off;"]

web/landing/docker-entrypoint.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Génère le fichier de config à partir de la variable d'environnement
5+
cat > /usr/share/nginx/html/script/annuaire/env-config.js << EOF
6+
export const API_URL = "${PUBLIC_ANNUAIRE_API_URL}";
7+
EOF
8+
9+
# Lance la commande normale (nginx)
10+
exec "$@"

web/landing/img/carte-france.svg

Lines changed: 1221 additions & 0 deletions
Loading

web/landing/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@
105105
<a class="nav-link" href="/pages/travaux.html">Travaux en
106106
cours</a>
107107
</li>
108+
<li class="nav-item common-nav-item">
109+
<a class="nav-link" href="/pages/annuaire.html">Acteurs en production</a>
110+
</li>
108111
</ul>
109112
</div>
110113
</div>

web/landing/jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
testEnvironment: "jsdom",
3+
};

web/landing/pages/accompagnement.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@
105105
<a class="nav-link" href="/pages/travaux.html">Travaux en
106106
cours</a>
107107
</li>
108+
<li class="nav-item common-nav-item">
109+
<a class="nav-link" href="/pages/annuaire.html">Acteurs en production</a>
110+
</li>
108111
</ul>
109112
</div>
110113
</div>

web/landing/pages/actualites.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@
107107
<a class="nav-link" href="/pages/travaux.html">Travaux en
108108
cours</a>
109109
</li>
110+
<li class="nav-item common-nav-item">
111+
<a class="nav-link" href="/pages/annuaire.html">Acteurs en production</a>
112+
</li>
110113
</ul>
111114
</div>
112115
</div>

0 commit comments

Comments
 (0)