diff --git a/README.md b/README.md index e40cc3f..4fb866c 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,15 @@ The frontend will be available at http://localhost:3000 docker-compose up --build ``` -2. **Environment Variables** +2. **Run Migrations and Seeders in Production** + After your containers are up, run the following commands to apply database migrations and seed data inside the backend container: + ```bash + docker exec -it fusero-app-backend npx mikro-orm migration:up + docker exec -it fusero-app-backend npm run seed + ``` + **Note:** These commands must be run inside the backend container so they use the correct Docker network and environment variables. + +3. **Environment Variables** - Ensure all environment variables are properly set in your production environment - Never commit `.env` files to version control diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 79f6bad..bc830f5 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -3,7 +3,7 @@ server { server_name _; location ^~ /api/ { - proxy_pass http://fusero-app-backend:14000/; + proxy_pass http://fusero-app-backend:14000/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -29,7 +29,7 @@ server { ssl_certificate_key /etc/nginx/certs/fusero-selfsigned.key; location ^~ /api/ { - proxy_pass http://fusero-app-backend:14000/; + proxy_pass http://fusero-app-backend:14000/api/; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;