Two-side application usin Nest.js and Next.js to diplay a feed of news extracted from the latest at the Hacker News website.
The docker-compose.yaml
file references and env file (provided by default as axample.env) with the following mongo database information:
/example.env
MONGO_INITDB_ROOT_USERNAME=admin
MONGO_INITDB_ROOT_PASSWORD=pass
DB_URL=mongodb:https://admin:pass@mongo:27017/
URL='mongodb:https://admin:pass@mongo:27017/'
An .env file must be created in the backend directory with the connection url of the mongo database. For example:
/.env
PORT = 5500
An .env file must be created in the frontend directory with the backend url:
/.env
NEXT_PUBLIC_BACKEND_URL=<backend_link>
The name of the variable must start with 'NEXT_PUBLIC_'. If the variable is not defined, 'https://localhost:5500/' will be used instead.
$ sudo service docker start
$ docker compose build
$ docker compose up