Coder Social home page Coder Social logo

docker-shields's Introduction

Travis Pulls Layers Size Release Badges Beevelop

Shields.io for Docker 🐳

Run with Docker Compose

The docker-compose.yml file allows you to run Shields with Varnish as cache server. This should increase Shields' performance and should generally reduce the server load.

# Clone this repo
# Adapt docker-compose.yml for your needs (e.g. INFOSITE)
docker-compose up -d
docker-compose logs -f

Run manually

docker run -d --name shields -p 80:80 \
    -e INFOSITE="http://shields.example.com" \
    beevelop/shields

Navigate to your Shields instance at http://shields.example.com/try.html (try.html is necessary, as the root redirects to shields.io).

Configuration

  • GH_CLIENT_ID (default: null)
  • GH_CLIENT_SECRET (default:null)
  • INFOSITE (default: "http://shields.io")

Attention: You should definitely specify the GH_CLIENT_* variables to prevent reaching the request quota of 60 req / hour

docker-shields's People

Contributors

beevelop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-shields's Issues

container keeps restarting

Latest build keeps throwing this in log file:

30/03/2018 14:08:40No secret data found at /opt/shields/private/secret.json (see lib/server-secrets.js)
30/03/2018 14:08:[email protected] alert: no DSN provided, error reporting disabled
30/03/2018 14:08:410330130841 Server is starting up: http://[::]:80/
30/03/2018 14:08:41No fallback font set.
30/03/2018 14:08:41Unable to load fallback font. Using Helvetica-Bold instead.
30/03/2018 14:08:41/opt/shields/services/appveyor/appveyor.js:9
30/03/2018 14:08:41  async handle({repo, branch}) {
30/03/2018 14:08:41        ^^^^^^
30/03/2018 14:08:41
30/03/2018 14:08:41SyntaxError: Unexpected identifier
30/03/2018 14:08:41    at createScript (vm.js:56:10)
30/03/2018 14:08:41    at Object.runInThisContext (vm.js:97:10)
30/03/2018 14:08:41    at Module._compile (module.js:549:28)
30/03/2018 14:08:41    at Object.Module._extensions..js (module.js:586:10)
30/03/2018 14:08:41    at Module.load (module.js:494:32)
30/03/2018 14:08:41    at tryModuleLoad (module.js:453:12)
30/03/2018 14:08:41    at Function.Module._load (module.js:445:3)
30/03/2018 14:08:41    at Module.require (module.js:504:17)
30/03/2018 14:08:41    at require (internal/module.js:20:19)
30/03/2018 14:08:41    at glob.sync.filter.map.path (/opt/shields/server.js:209:16)
30/03/2018 14:08:41    at Array.map (native)
30/03/2018 14:08:41    at Object.<anonymous> (/opt/shields/server.js:209:4)
30/03/2018 14:08:41    at Module._compile (module.js:577:32)
30/03/2018 14:08:41    at Object.Module._extensions..js (module.js:586:10)
30/03/2018 14:08:41    at Module.load (module.js:494:32)
30/03/2018 14:08:41    at tryModuleLoad (module.js:453:12)
30/03/2018 14:08:41    at Function.Module._load (module.js:445:3)
30/03/2018 14:08:41    at Module.runMain (module.js:611:10)
30/03/2018 14:08:41    at run (bootstrap_node.js:387:7)
30/03/2018 14:08:41    at startup (bootstrap_node.js:153:9)
30/03/2018 14:08:41    at bootstrap_node.js:500:3

Can't render PNG

Hello,

Shields.io allow for .png rendering instead of .svg. However this does not work on this docker container.

I assume that's because there's no imagemagick added. See my fix for details

Please advise.

Is this working?

I have downloaded the project and run it but it's not working (i tried with the docker compose and docker run)

Fix Shields version via checkout

Right now, the Dockerfile uses the most recent master version of Shields. This might lead to issues like #5. Therefore the version should be fixed via Commit Hash (and updated regularly).

Error when starting

Hi @beevelop ,
I don't know if I am doing something wrong, but basically I pulled the image and then tried to start it. But when I do I have the following error:

Starting samples_shields_1 ... done
Creating samples_varnish_1 ... done
Attaching to samples_shields_1, samples_varnish_1
shields_1  | /opt/shields/server.js:135
shields_1  | async function stop() {
shields_1  |       ^^^^^^^^
shields_1  |
shields_1  | SyntaxError: Unexpected token function
shields_1  |     at createScript (vm.js:56:10)
shields_1  |     at Object.runInThisContext (vm.js:97:10)
shields_1  |     at Module._compile (module.js:549:28)
shields_1  |     at Object.Module._extensions..js (module.js:586:10)
shields_1  |     at Module.load (module.js:494:32)
shields_1  |     at tryModuleLoad (module.js:453:12)
shields_1  |     at Function.Module._load (module.js:445:3)
shields_1  |     at Module.runMain (module.js:611:10)
shields_1  |     at run (bootstrap_node.js:394:7)
shields_1  |     at startup (bootstrap_node.js:160:9)
samples_shields_1 exited with code 1

My docker-compose file look like the following:

version: '3'
services:
  shields:
    image: beevelop/shields
    environment:
      - INFOSITE:http://shields.local
    restart: always
  varnish:
    image: beevelop/varnish
    environment:
      - VIRTUAL_HOST:shields.local
    links:
    - "shields:backend"
    restart: always

Thank you for your assistance.

Configure without environment

The environment can be read within the system and the configuration, is there another way to load the GH_TOKEN_* configuration than using environment?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.