badges / badges/shields

Can't connect to server after using `docker run`

Open
#3,165 12 comments 1 reaction 0 assignees View on GitHub
documentation self-hosting
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

:beetle: **Description**

I'm following the instructions in `doc/self-hosting.md` to first build the Docker image (which works fine) and then run the container using `docker run --rm -p 8080:80 --name shields shields`.

It looks like the container hangs forever:

```
$ docker run --rm -p 8080:80 --name shields shields
raven@2.6.4 alert: no DSN provided, error reporting disabled
Configuration:
{ bind: { address: 'localhost' },
metrics: { prometheus: { enabled: false } },
ssl: { isSecure: false },
cors: { allowedOrigin: [ 'http://localhost:3000' ] },
persistence: { dir: './private' },
services:
{ github:
{ baseUri: 'https://api.github.com/',
debug: { enabled: false, intervalSeconds: 200 } },
trace: false },
profiling: { makeBadge: false },
cacheHeaders: { defaultCacheLengthSeconds: 120 },
rateLimit: false,
handleInternalErrors: false,
fetchLimit: '10MB' }
0305092655 FsTokenPersistence configured with /usr/src/app/private/github-user-tokens.json
0305092655 Server is starting up: http://localhost/
```

I think it expects a response from Gatsby or something (I'm not a Node expert).

If I run the app manually using `npm start` it works, but I'd like to containerize it.

Contributor guide

Open the contributing guide

Research direction

Start with doc/self-hosting.md and reproduce the documented docker run command, then compare its behavior with npm start. Check why the container reports that the server is listening on localhost and verify the service is reachable through port 8080; done means the documented container command serves the app successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.