Skip to content

Conversation

@M-PROGRAMMATION
Copy link
Owner

…ns, and enhance Docker scripts

  • Updated layout.tsx with new title and description for FizzUp application.
  • Redesigned page.tsx with a new hero section, navigation, and feature grid.
  • Added environment configuration files for development, production, and local environments.
  • Created a shared library with enums and interfaces for environment management.
  • Introduced new Docker management scripts for development and production.
  • Added Docker Compose configuration for production environment.
  • Removed obsolete Docker scripts and ensured better organization of Docker-related files.

…ns, and enhance Docker scripts

- Updated layout.tsx with new title and description for FizzUp application.
- Redesigned page.tsx with a new hero section, navigation, and feature grid.
- Added environment configuration files for development, production, and local environments.
- Created a shared library with enums and interfaces for environment management.
- Introduced new Docker management scripts for development and production.
- Added Docker Compose configuration for production environment.
- Removed obsolete Docker scripts and ensured better organization of Docker-related files.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refreshes the web app’s landing layout/content, introduces a new Nx “shared” library for environment typing/validation, and reorganizes Docker tooling by replacing multiple small scripts with consolidated dev/prod scripts plus a production compose file.

Changes:

  • Redesign the web app landing page and update metadata.
  • Add libs/shared with environment enums/interfaces (Zod schemas) and wire it into the web app via TS path alias.
  • Replace legacy Docker helper scripts with docker-dev.sh / docker-prod.sh and add a production Docker Compose file.

Reviewed changes

Copilot reviewed 29 out of 34 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
scripts/docker-dev.sh New consolidated dev Docker management script (start/stop/logs/clean/check).
scripts/docker-prod.sh New production Docker management script (start/stop/build/logs/clean/debug).
scripts/docker-start.sh Removed legacy Docker start script (superseded by docker-dev.sh).
scripts/docker-stop.sh Removed legacy Docker stop script (superseded by docker-dev.sh).
scripts/docker-restart.sh Removed legacy Docker restart script (superseded by docker-dev.sh).
scripts/docker-status.sh Removed legacy Docker status script (superseded by docker-dev.sh).
scripts/docker-logs.sh Removed legacy Docker logs script (superseded by docker-dev.sh).
scripts/docker-clean.sh Removed legacy Docker clean script (superseded by docker-dev.sh).
scripts/check-ports.sh Removed legacy port-check script (superseded by docker-dev.sh check).
docker-compose.prod.yaml Introduces a production compose file for infrastructure services (Postgres/Redis/etc.).
scripts/docker/Dockerfile.api Added API Dockerfile placeholder for future container builds.
scripts/docker/Dockerfile.web Added web Dockerfile placeholder for future container builds.
scripts/docker/nginx/nginx.conf Added Nginx config placeholder for future reverse-proxy/static serving.
libs/shared/src/lib/enums/environment.enum.ts Adds environment enum/schema definitions (Zod).
libs/shared/src/lib/interfaces/web-environment.interface.ts Adds a Zod schema + inferred type for web app environment configuration.
libs/shared/src/lib/enums/index.ts Barrel export for enums.
libs/shared/src/lib/interfaces/index.ts Barrel export for interfaces.
libs/shared/src/lib/index.ts Library entry exports.
libs/shared/src/index.ts Public entrypoint export.
libs/shared/tsconfig.json TS config for the shared Nx library.
libs/shared/tsconfig.lib.json Build TS config for the shared Nx library.
libs/shared/eslint.config.cjs Shared lib eslint config extending repo base.
libs/shared/project.json Nx project definition for shared library.
libs/shared/package.json Shared library package manifest.
libs/shared/README.md Shared library README.
apps/web-app/tsconfig.json Adds TS path alias for @shared.
apps/web-app/app/layout.tsx Updates app metadata (title/description).
apps/web-app/app/page.tsx New landing page UI in the App Router home route.
apps/web-app/app/pages/index.tsx Adds an additional page component under app/pages/ (currently not a valid App Router route file).
apps/web-app/app/environments/environment.ts Adds local environment config constant.
apps/web-app/app/environments/environment.development.ts Adds development environment config constant.
apps/web-app/app/environments/environment.production.ts Adds production environment config constant.
apps/web-app/app/environments/index.ts Adds an environments index file (currently empty).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…for improved usability, and refine environment configurations
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 28 out of 33 changed files in this pull request and generated 15 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +37
ports:
- "${REDIS_PORT}:6379"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redis is published to the host via ports. Exposing Redis in production can allow unauthorized access if network controls are misconfigured; prefer keeping it internal (no ports) or binding to 127.0.0.1 at minimum.

Suggested change
ports:
- "${REDIS_PORT}:6379"

Copilot uses AI. Check for mistakes.
Comment on lines +92 to +95
stop)
log_info "Arrêt des services..."
docker_compose down
log_success "Services arrêtés!"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stop doesn’t call check_env, but docker_compose always includes --env-file "$ENV_FILE". If .env.prod is missing, ./scripts/docker-prod.sh stop will fail (even though stopping running containers is a reasonable operation). Either call check_env here as well, or make docker_compose handle the missing env file for commands like down/ps/logs.

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +7
export const environment: WebAppEnvironment = {
environment: Environment.PRODUCTION,
hostUrl: 'http://localhost:4200',
apiUrl: 'http://localhost:3000/api/v1',
}; No newline at end of file
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

environment.production.ts currently hard-codes hostUrl/apiUrl to localhost, which is unlikely to be correct for a real production deployment. Consider wiring these to deployment-time config (e.g., process.env.NEXT_PUBLIC_*) or at least setting production defaults that aren’t localhost.

Copilot uses AI. Check for mistakes.
Comment on lines +74 to +78
Exemples:
./docker-prod.sh start
./docker-prod.sh logs-db
./docker-prod.sh build
./docker-prod.sh debug
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples in the help output use ./docker-prod.sh ..., but the script is located at scripts/docker-prod.sh. Adjust the examples to the correct path to avoid confusion.

Copilot uses AI. Check for mistakes.
Comment on lines +35 to +37
ENV_FILE="${2:-.env.development}"
COMPOSE_FILE="docker-compose.local.yaml"

Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script always passes --env-file "$ENV_FILE" but the repo doesn’t include a .env.development file (only .env.example). Running ./scripts/docker-dev.sh start will fail immediately because Docker Compose errors on a missing env file. Consider adding an env-file existence check (and pointing users to the correct example file to copy) before executing compose commands.

Copilot uses AI. Check for mistakes.
volumes:
- ${POSTGRES_VOLUME}:/var/lib/postgresql/data
ports:
- "${POSTGRES_PORT}:5432"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In docker-compose.prod.yaml, PostgreSQL is published to the host via ports. Exposing the DB port in production is a security risk unless it’s strictly required. Prefer removing the port mapping (internal network only), or bind to 127.0.0.1 if only local access is needed.

Suggested change
- "${POSTGRES_PORT}:5432"
- "127.0.0.1:${POSTGRES_PORT}:5432"

Copilot uses AI. Check for mistakes.
Comment on lines +59 to +60
Usage: ./docker-prod.sh [COMMAND]

Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Help text says Usage: ./docker-prod.sh [COMMAND], but the script lives under scripts/ (invoked as ./scripts/docker-prod.sh ...). Update the usage/examples so users can copy/paste working commands.

Copilot uses AI. Check for mistakes.
Comment on lines +149 to +157
logs-db)
log_info "Affichage des logs de PostgreSQL..."
docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" logs -f postgres
;;

logs-redis)
log_info "Affichage des logs de Redis..."
docker compose -f "$COMPOSE_FILE" --env-file "$ENV_FILE" logs -f redis
;;
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs-db and logs-redis are using service names postgres/redis, but in docker-compose.local.yaml the services are named fizzup_postgres and fizzup_redis. As-is, these commands will fail with “no such service”. Update the service names (or centralize them in variables) to match the compose file.

Copilot uses AI. Check for mistakes.
check_env() {
if [ ! -f "$ENV_FILE" ]; then
log_error "Le fichier $ENV_FILE n'existe pas!"
log_info "Copiez .env.prod.example en $ENV_FILE et configurez vos variables"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error guidance references .env.prod.example, but there is no such file in the repo. This will block users from successfully creating .env.prod. Update the message (and/or add the referenced example file) to match what actually exists (e.g., .env.example or a real .env.prod.example).

Suggested change
log_info "Copiez .env.prod.example en $ENV_FILE et configurez vos variables"
log_info "Copiez .env.example en $ENV_FILE et configurez vos variables"

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +21
<Link href="/about" className="text-gray-600 hover:text-blue-600 transition-colors">
À propos
</Link>
<Link href="/features" className="text-gray-600 hover:text-blue-600 transition-colors">
Fonctionnalités
</Link>
<Link href="/contact" className="text-gray-600 hover:text-blue-600 transition-colors">
Contact
</Link>
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These navigation links point to /about, /features, and /contact, but there are no corresponding routes under apps/web-app/app/ in this PR. This will produce 404s. Either add the pages (e.g., app/about/page.tsx, etc.) or change these links to existing sections/routes.

Copilot uses AI. Check for mistakes.
@M-PROGRAMMATION M-PROGRAMMATION marked this pull request as draft January 26, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant