experiments w/ maps and rails
TODOS:
- graphql: acces user_info and lmarkers... at the same time
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
docker build -t mytag/adi .
docker run -it --net=host mytag/adi
#do some tests
docker exec -it bundle exec rails test
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 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