tunwg --port=3000
and tunwg --port=3001
give two domain names
Init each DB: initdb -D .db0
and initdb -D .db1
Procfile.init:
postgresql: postgres -D .db$PORT_OFFSET -p 500$PORT_OFFSET
redis: redis-server --port 600$PORT_OFFSET
setup: env REDIS_PORT=600$PORT_OFFSET DB_PORT=500$PORT_OFFSET bundle exec rails db:setup
Procfile.aio:
postgresql: postgres -D .db$PORT_OFFSET -p 500$PORT_OFFSET
redis: redis-server --port 600$PORT_OFFSET
web: env PORT=300$PORT_OFFSET REDIS_PORT=600$PORT_OFFSET DB_PORT=500$PORT_OFFSET bundle exec puma -C config/puma.rb
sidekiq: env PORT=300$PORT_OFFSET REDIS_PORT=600$PORT_OFFSET DB_PORT=500$PORT_OFFSET bundle exec sidekiq
stream: env PORT=400$PORT_OFFSET REDIS_PORT=600$PORT_OFFSET DB_PORT=500$PORT_OFFSET yarn run start
Run:
RAILS_ENV=development PORT_OFFSET=0 overmind -f Procfile.init
RAILS_ENV=development PORT_OFFSET=1 overmind -f Procfile.init
Then start servers:
LOCAL_HTTPS=true LOCAL_DOMAIN=d4nme3aapjawr4o6.l.tunwg.com RAILS_ENV=development PORT_OFFSET=0 overmind start -f Procfile.aio
and
LOCAL_HTTPS=true LOCAL_DOMAIN=zh4rlxq6pwtp4khj.l.tunwg.com RAILS_ENV=development PORT_OFFSET=1 overmind start -s .overmind.sock.1 -f Procfile.aio
Those domain names are the domain names from tunwg.
Separately, run webpacker:
bin/webpack-dev-server