Welcome to GPressFeed, a web application designed to aggregate and display news articles from various sources. This README provides installation instructions and important configuration details.
The purpose of this application is to bring a project from the idea stage to a finished product with a single requirement: self-hosting. To keep the documentation concise, I'll highlight the most noteworthy aspect of this project—the infrastructure.
The traffic is redirected using a tunnel to the Reverse Proxy (./ReverseProxy/nginx.conf
), splitting the traffic. By using Regex, all traffic with the starting path /api/pressfeed
will be redirected to the GPressFeed.API
container, while everything else flows toward the GPressFeed.UI
container. The NGINX Reverse Proxy is also configured to rely on the Docker DNS Resolver, allowing the use of gpressfeedapi
and gpressfeedui
domain names instead of Docker container IP addresses.
Running the application is as simple as having Docker installed, but for development purposes, the following dependencies must be installed:
- .NET 6+ SDK
- Node v16+
- Clone the Repository.
- Run
docker-compose build
in the root directory of the project (the one containing thedocker-compose.yml
file). - Run
docker-compose up
in the same directory.
Note: The application runs on port 80; ensure that it is free.
Voila, typing localhost
in any browser should lead you to the application.
To deploy the application, some configurations must be changed. This section is divided into multiple segments to cover each part of the project clearly.
Within this file, make the following changes:
- Uncomment the tunnel section and replace the
cloudflareToken
argument with your Cloudflare Tunnel token. - Replace the
POSTGRES_PASSWORD
environment variable value with your own. Ensure it matches the password in./GPressFeed.API/Hosts/GPressFeed.API/appsettings.json
.
- Inside the
./GPressFeed.API/Dockerfile
, remove the-p:Configuration=Development
argument to enable CORS. - Change the following credentials in
./GPressFeed.API/Hosts/GPressFeed.API/appsettings.json
:dbpassword
,yourgoogleapikey
,CorsConfiguration.OriginAddress
(based on the domain name you intend to use for the Cloudflare Tunnel).
For the UI part of this project, the change is simple. In ./GPressFeed.UI/.env
, change the value of PUBLIC_IS_DEVELOPMENT_ENV
to False
.
Congratulations! With a bit of luck, the application should be deployed on your computer, with the tunnel forwarding traffic from the Domain Name to GPressFeed.
GPressfeed is licensed under the MIT License. Please review the license before using or contributing to the project.