Skip to content

Commit d434a5d

Browse files
authored
Merge pull request #304 from dsgnr/fix_301
Correct documentation for API_URL environment variable"
2 parents 50f570f + c79db48 commit d434a5d

1 file changed

Lines changed: 28 additions & 18 deletions

File tree

README.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
[portchecker.io](https://portchecker.io) is an open-source API for checking port availability on specified hostnames or IP addresses. Ideal for developers and network admins, it helps troubleshoot network setups, validate firewall rules, and assess potential access points.
44

5-
65
## Table of contents:
76

87
- [Getting Started](#getting-started)
@@ -15,78 +14,87 @@
1514
- [Contributing](#contributing)
1615

1716
## Getting Started
17+
1818
The project consists of two containers. The front-end is a static HTML file sat behind Nginx. The back-end is a simple API built using [Litestar](https://litestar.dev/).
1919

2020
The project aims to be super simple, with low overhead and also the least amount of dependencies as possible.
2121

2222
The project contains both production and development stacks. The production stack utilises `gunicorn` as the API's process manager with `uvicorn` workers. Development utilises `uvicorn` with the `--reload` parameter.
2323

2424
## Documentation
25-
API routes and specification can be found at [portchecker.io/docs](https://portchecker.io/docs)
2625

26+
API routes and specification can be found at [portchecker.io/docs](https://portchecker.io/docs)
2727

2828
## Development
2929

3030
### Standalone
3131

3232
#### Web
33+
3334
> [!NOTE]
3435
> Uses [Node](https://nodejs.org/) version 23 and newer. Requires [Yarn](https://classic.yarnpkg.com/en/)
3536
3637
Bringing up the UI outside of Docker;
37-
~~~
38+
39+
```
3840
$ cd frontend/web
3941
$ yarn install
4042
$ yarn dev
41-
~~~
43+
```
4244

4345
portchecker.io front-end be running at [http://0.0.0.0:8080](http://0.0.0.0:8080).
4446

4547
#### API
48+
4649
> [!NOTE]
4750
> Uses Python 3.12. The Python environment uses [Poetry](https://pypi.org/project/poetry/) for package management. This must be installed.
4851
49-
~~~
52+
```
5053
$ cd backend/api
5154
$ poetry install
5255
$ uvicorn main:app --host 0.0.0.0 --port 8000 --reload
53-
~~~
56+
```
5457

5558
portchecker.io API be running at [http://0.0.0.0:8000](http://0.0.0.0:8000).
5659

57-
5860
### Docker
59-
~~~
61+
62+
```
6063
$ docker-compose -f docker-compose-dev.yml up --build
61-
~~~
64+
```
6265

6366
portchecker.io front-end will be running at [http://0.0.0.0:8080](http://0.0.0.0:8080) and the API will be running at [http://0.0.0.0:8000](http://0.0.0.0:8000).
6467

6568
## Production
69+
6670
### Docker
71+
6772
> [!NOTE]
6873
> Uses [ghcr.io/dsgnr/portcheckerio-web:latest](https://github.com/dsgnr/portchecker.io/pkgs/container/portcheckerio-web) and [ghcr.io/dsgnr/portcheckerio-api:latest](https://github.com/dsgnr/portchecker.io/pkgs/container/portcheckerio-api).
6974
70-
~~~
75+
```
7176
$ docker-compose up
72-
~~~
77+
```
7378

7479
portchecker.io front-end will be running at [http://0.0.0.0:8080](http://0.0.0.0:8080) and the API will be running at [http://0.0.0.0:8000](http://0.0.0.0:8000).
7580

7681
## Environment Variables
82+
7783
The following configuration options are available. These would be set within the Docker compose files, or in your environment if you're using portchecker standalone.
7884

7985
### Web
86+
8087
| Name | Required? | Default | Notes |
81-
|------------------|-----------|-----------------|------------------------------------------------------------------------------------------|
82-
| DEFAULT_PORT | No | http://api:8000 | The URL of the API service if changed from the default. The scheme and port is required. |
88+
| ---------------- | --------- | --------------- | ---------------------------------------------------------------------------------------- |
89+
| API_URL | No | http://api:8000 | The URL of the API service if changed from the default. The scheme and port is required. |
8390
| DEFAULT_PORT | No | 443 | Allows a default port number to be prefilled in the UI |
8491
| GOOGLE_ANALYTICS | No | | Allows for a Google Analytics tracking code to be provided |
8592

8693
### API
87-
| Name | Required? | Default | Notes |
88-
|---------------|-----------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
89-
| ALLOW_PRIVATE | No | False | Allows private IP addresses in [ IANA IPv4 Special Registry ]( https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml ) ranges to be checked |
94+
95+
| Name | Required? | Default | Notes |
96+
| ------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97+
| ALLOW_PRIVATE | No | False | Allows private IP addresses in [ IANA IPv4 Special Registry ](https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml) ranges to be checked |
9098

9199
## Contributing
92100

@@ -95,10 +103,12 @@ I'm thrilled that you’re interested in contributing to this project! Here’s
95103
### How to Contribute
96104

97105
1. **Submit Issues**:
106+
98107
- If you encounter any bugs or have suggestions for improvements, please submit an issue on our [GitHub Issues](https://github.com/dsgnr/portchecker.io/issues) page.
99108
- Provide as much detail as possible, including steps to reproduce and screenshots if applicable.
100109

101110
2. **Propose Features**:
111+
102112
- Have a great idea for a new feature? Open a feature request issue in the same [GitHub Issues](https://github.com/dsgnr/portchecker.io/issues) page.
103113
- Describe the feature in detail and explain how it will benefit the project.
104114

@@ -122,8 +132,8 @@ Where this project has been mentioned.
122132

123133
## Author
124134

125-
* Website: https://danielhand.io
126-
* Github: [@dsgnr](https://github.com/dsgnr)
135+
- Website: https://danielhand.io
136+
- Github: [@dsgnr](https://github.com/dsgnr)
127137

128138
## Show your support
129139

0 commit comments

Comments
 (0)