Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
hooopo committed Feb 27, 2021
0 parents commit bc475fa
Show file tree
Hide file tree
Showing 231 changed files with 19,589 additions and 0 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.bundle
.env
.env.*
.git
.gitignore
docker-compose.*
docker/Dockerfile
docker/dockerfiles
log
storage
public/system
tmp
.codeclimate.yml
public/assets
public/packs
node_modules
vendor/bundle
.DS_Store
*.swp
*~
15 changes: 15 additions & 0 deletions .env.example.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
RAILS_ENV=development
SKIP_TEST_DATABASE=true
HYPER_DATABASE_URL=postgres://postgres:password@tsdb:5432/tsdb_dev
REDIS_URL=redis://redis:6379
MAIN_DATABASE_URL=postgres://postgres:password@postgres:5432/hypercable_dev
REDIS_HOST=redis
REDIS_PORT=6379

GEOIPUPDATE_ACCOUNT_ID=
GEOIPUPDATE_LICENSE_KEY=
GEOIPUPDATE_EDITION_IDS="GeoLite2-ASN GeoLite2-City GeoLite2-Country"
GEOIPUPDATE_FREQUENCY=72

HOST=localhost:3333
COLLECTOR_HOST=localhost:8000
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- main
paths-ignore:
- 'README*.md'
- 'docs/**'
pull_request:
branches:
- main
paths-ignore:
- 'README*.md'
- 'docs/**'

jobs:
build:
if: ${{ !contains(github.event.commits[0].message, '[skip ci]') }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rubocop

docker_web:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/hypercable:latest
build-args: |
SECRET_KEY_BASE=precompile_placeholder
RAILS_ENV=production
docker_collector:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: ./docker/dockerfiles
file: ./docker/dockerfiles/openresty.Dockerfile
platforms: linux/amd64
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/hypercable-openresty:latest
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle
.env
.env.production

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
Loading

0 comments on commit bc475fa

Please sign in to comment.