Skip to content

Commit

Permalink
Change README to reflect .env name.
Browse files Browse the repository at this point in the history
  • Loading branch information
thekeenant committed Dec 3, 2023
1 parent 5085af1 commit 1550036
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Configurations for running the [Madgrades API](http://github.com/Madgrades/api.m
## Instructions

1.
Create a new `*.env` file (e.g. `prod.env`) based on the provided `.env.example`. The following steps and the GitHub callback URL above assume you leave the example defaults unchanged.
Create a new `.env` file based on the provided `.env.example`. The following steps and the GitHub callback URL above assume you leave the example defaults unchanged.

1.
Run all the services using configuration provided from the env file you created.

```bash
$ docker compose --env-file=prod.env up --detach
$ docker compose up --detach
```

This initializes the databases, seeds them with data, and starts up the API.
Expand All @@ -26,8 +26,8 @@ You can now access the API (`http://localhost:8080` if you left the default sett
You can also access the frontend (`http://localhost:3000` if you left the default settings). Note that for the first run you will need to access the API, login with your GitHub account and get a Madgrades API token, and restart the frontend with that token set in the environment variables:

```bash
$ docker compose --env-file=.env down frontend
$ docker compose --env-file=.env up frontend --detach
$ docker compose down frontend
$ docker compose up frontend --detach
```

## Notes
Expand All @@ -37,13 +37,21 @@ $ docker compose --env-file=.env up frontend --detach
If new data is available, re-seed the database by updating the image in the Docker compose configuration and running the seed service. This service will terminate after the seeding is completed.

```bash
$ docker compose --env-file=prod.env up seed
$ docker compose up seed
```

### Start the frontend and API without re-seeding

Skip re-seeding the database by specifying the `frontend` and `api` services to start.

```bash
$ docker compose --env-file=prod.env up frontend api --detach
$ docker compose up frontend api --detach
```

### Running multiple instances

To run multiple instances, configure a new environment variables file, e.g. `.env.dev`, and specify it with your Docker compose commands:

```bash
docker compose --env-file=.env.dev up frontend api --detach
```

0 comments on commit 1550036

Please sign in to comment.