Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Feb 8, 2020
2 parents 14d039b + 9416bcb commit 713ec10
Show file tree
Hide file tree
Showing 69 changed files with 15,402 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Scala CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/sample-config/ for more details
#
version: 2
jobs:
backend_build:
docker:
- image: circleci/node:12
steps:
- checkout
- run:
command: npm ci
working_directory: backend
# Check whether "run build" is successful
- run:
command: npm run build
working_directory: backend

frontend_build:
docker:
- image: circleci/node:10
steps:
- checkout
- run:
command: npm install
working_directory: frontend
- run:
command: npm run lint
working_directory: frontend
# Check whether "run build" is successful
- run:
command: npm run build
working_directory: frontend

docker_compose_build:
machine:
# (base: https://circleci.com/docs/2.0/configuration-reference/#machine)
image: ubuntu-1604:201903-01
steps:
- checkout
- run:
command: docker-compose build

docker_compose_local_build:
machine:
# (base: https://circleci.com/docs/2.0/configuration-reference/#machine)
image: ubuntu-1604:201903-01
steps:
- checkout
- run:
command: docker-compose -f docker-compose.local.yml build

workflows:
version: 2
frontend_and_backend:
jobs:
- backend_build
- frontend_build
- docker_compose_build
- docker_compose_local_build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/log
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## 0.1.0 - 2020-02-08
### Added
* Initial release

[Unreleased]: https://github.com/nwtgck/gh-card/compare/v0.1.0...HEAD
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Ryo Ota

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# gh-card
[![CircleCI](https://circleci.com/gh/nwtgck/gh-card.svg?style=shield)](https://circleci.com/gh/nwtgck/gh-card)

GitHub Repository Card for Every Web Site: <https://gh-card.dev>

## Example SVG card

![Piping Server static repo card](doc_assets/piping-server.svg)

## Demo
![gh-card](doc_assets/gh-card.gif)

## How it works?
The idea is similar to status badges from Travis CI, CircleCI and etc.

An image URL is like "<https://gh-card.dev/repos/nwtgck/piping-server.svg>". The request triggers the backend server to call GitHub API request. The repository information are cached currently by Redis.


## Related projects
* [GitHub Link Card Creator](https://github.com/po3rin/github_link_creator)
* [Unofficial GitHub Cards](https://github.com/lepture/github-cards)

This might be similar to them. The purpose of this project is to provide an image which can be used in every site and the design should be like official GitHub repo card. I hope one day GitHub itself provides this feature officially.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
2 changes: 2 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
2 changes: 2 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
17 changes: 17 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:12.14

LABEL maintainer="Ryo Ota <[email protected]>"

COPY . /app

# Move to /app
WORKDIR /app

# Install requirements, build and remove devDependencies
# (from: https://stackoverflow.com/a/25571391/2885946)
RUN npm ci && \
npm run build && \
npm prune --production

# Run a server
ENTRYPOINT [ "node", "dist/src/index.js" ]
Loading

0 comments on commit 713ec10

Please sign in to comment.