Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 872 Bytes

README.md

File metadata and controls

29 lines (19 loc) · 872 Bytes

DOCKER-ECS-FRONTEND

Dockerized NextJS app for backend: https://github.com/FeroHriadel/docker-ecs-backend Includes IaC deployment to AWS ECS and CICD

ENVIRONMENT VARIABLES

  • make sure to add /.env with:
NEXT_PUBLIC_API_ENDPOINT = http://localhost:80/api

BACKEND FOR FRONTEND DEVELOPMENT

  • pull backend from github (docker-ecs-backend)
  • $ cd docker-ecs-backend/backend
  • $ docker-compose up -d (will launch mysql db and nodejs api on localhost:80)
  • the nodejs api will fail initially (database didn't have time to init properly) - restart it (not the whole container, just the nodejs api subcontainer)
  • then you're good to go. Go to FE folder and: $ npm run dev
  • now your nextjs on localhost:3000 can connect to the api with db on localhost:80

DEPLOYMENT

  • please see `/deployment/README.md on detailed instructions