Giter Site home page Giter Site logo

adi-rps's Introduction

Adi geo game.

experiments w/ maps and rails

TODOS:

  • graphql: acces user_info and lmarkers... at the same time

Running Production-ish (Not ready for real production!)

build

docker build -t adiprod --file '<PATH_TO_DIR>/Dockerfile.prod' .

pass in secret key

rake secret
export SECRET_KEY_BASE=<your_key>
docker-compose up  #dont need to pass in, will take environment from shell
#or detached 

test its working

curl localhost:3003

set up db in new postgres container

docker-compose exec web bash
rails db:create
rails db:migrate

monitor detached mode

docker-compose up -d
docker-compose logs --follow
docker-compose stop
docker-compose start

delete data

docker-compose exec web rails console
> Lmarker.all.delete_all

Testing locally w/ Docker

docker build -t mytag/adi .
docker run -it --net=host mytag/adi

#do some tests
docker exec -it bundle exec rails test
(hackish) Develop locally w/ docker-compose

uncomment out the volume. when a new component is needed:

# update code, add a gem etc..
# modify docker-compose cmd for web service:
git pull / git commit 
docker-compose stop
cmd: bash -c "bundle install; runserver etc.."
outside container...
cd client && yarn install && cd ..
bundle exec rake assets:precompile
docker-compose up

docker hub for gitlab runner integration

docker login 
docker tag <existing-image> <hub-user>/<repo-name>[:<tag>]
docker push <hub-user>/<repo-name>:<tag>

Then push to your gitlab and let pipeline takeover

git add <changeed_file>
git commit -m 'run pipeline!'
git push gitlab_remote

###Background Tasks

apply rps game logic on lmarkers

rake rps_game_logic_on_lmarkers

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.