Skip to content

Commit

Permalink
Update Default Port
Browse files Browse the repository at this point in the history
Update Documentation
  • Loading branch information
JohnGrubba committed Jun 25, 2024
1 parent 7066dba commit b0328b5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .env

This file was deleted.

2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
container_name: ezauth-api
build: "./src"
ports:
- "3000:80"
- "3250:80"
environment:
- DATABASE_URL=mongodb://admin:admin@db/ezauth?authSource=admin&retryWrites=true&w=majority
restart: always
Expand Down
29 changes: 28 additions & 1 deletion docs/getting-started/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,31 @@ After you have configured the service you can start it by running the following

``` bash
docker compose up -d
```
```
The service should now be running and you can access the API by navigating to <a href="http://localhost:3250">`http://localhost:3250`</a> in your browser. The API Documentation is available at <a href="http://localhost:3250/docs">`http://localhost:3250/docs`</a>.

### Further Customization
If you want to further customize the service you can take a look at the `docker-compose.yml` file in the root directory of the repository. This file contains all the configuration options for the service. You can change the port on which the service is running, the volume mounts, and the environment variables.

#### API Configuration
The Prefix for all Parameters here is `services.api`.
The Following Environment Variables can be set in the `docker-compose.yml` file to configure the API:


| Parameter | Description |
|------------|-------------|
| `ports` | **Datatype:** String <br> **Default:** `"3250:80"` <br> Only change the left (host) side of the ports. The API will always run on Port 80 internally, and can be forwarded to any port on the host system. In this example `3250`. |
| `volumes` | **Datatype:** String <br> **Default:** `"./config:/app/config"` <br> The volume mount for the configuration file. Only change the left (host) side of the configuration folder directory. In this example `./config`. |

#### Database Configuration
The Prefix for all Parameters here is `services.db.environment`.
When changing the database configuration, make sure to also change the `api` section in the `docker-compose.yml` file to reflect the new database connection.
The following environment variables can be set in the `docker-compose.yml` file to configure the database connection:

| Parameter | Description |
|------------|-------------|
| `MONGO_INITDB_ROOT_USERNAME` | **Datatype:** String <br> **Default:** `"admin"` <br> The Root Username for the Database. |
| `MONGO_INITDB_ROOT_PASSWORD` | **Datatype:** String <br> **Default:** `"admin"` <br> The Root Password for the Database. |
| `MONGO_INITDB_DATABASE` | **Datatype:** String <br> **Default:** `"ezauth"` <br> The Database Name. |

You can also change the location of the database data by changing the `volumes` section of the `db` section in the `docker-compose.yml` file.

0 comments on commit b0328b5

Please sign in to comment.