Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding of docker installation in CONTRIBUTING.md #735

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,46 @@ Install PHP from [XAMPP](https://www.apachefriends.org/index.html) or [php.net](

[📥 Download Composer](https://getcomposer.org/download/)

#### Docker

Docker provides an easier way to set up the development environment with all dependencies pre-configured.

##### Requirements

- Docker
- Docker Compose (optional, but recommended)

##### Quick setup

1. Start the container using Docker:

```
docker run -d --network host --name streak-stats --restart unless-stopped -e TOKEN=<your-github-token> -e APPPORT=9000 qcdev/github-readme-streak-stats
```

> [!TIP]
> You can set the APPPORT for a more suitable Port depending your need.

##### Using docker compose

1. Export your Github Token:

```sh
export TOKEN=<your-github-token>
```
2. Get the [docker-compose.yml file](https://github.com/qcoudeyr/Docker-github-readme-streak-stats/blob/main/docker-compose.yml) from this [repo](https://github.com/qcoudeyr/Docker-github-readme-streak-stats).

3. Start the container using Docker Compose:

```sh
docker-compose up -d
```

The service will be available at `http://localhost:9000`

> [!Note]
> You will need a reverse proxy open to the public internet for external use. For simple public use (like Github), consider using the [Vercel installation](https://github.com/DenverCoder1/github-readme-streak-stats) instead.

### Clone the repository

```
Expand Down Expand Up @@ -78,6 +118,9 @@ Open http://localhost:8000/?user=DenverCoder1 to run the project locally

Open http://localhost:8000/demo/ to run the demo site

For Docker installation:
Open http://localhost:9000/?user=DenverCoder1 (or your configured port)

### Running the tests

Run the following command to run the PHPUnit test script which will verify that the tested functionality is still working.
Expand Down
Loading