California Foundation for the Advancement of Electronic Arts cabins reservations system
- install docker & docker-compose: https://docs.docker.com/compose/install/
- To set the environment variable in the docker-compose file, create a
.env
file w/MYSQL_ROOT_PASSWORD=<YOUR MYSQL PASSWORD>
mv example.cabins.env cabins-dev.env
& replace all theXXXXXX
's with your values.- make sure
ProxyPass /assets
is commented out in conf/httpd-vhosts.conf - run
docker-compose -f ./docker-compose-local.yml build
- run
docker-compose -f ./docker-compose-local.yml up
- open separate terminal
docker-compose exec --user "$(id -u):$(id -g)" app rake db:reset
docker-compose exec --user "$(id -u):$(id -g)" app rake db:migrate
- git tag -a -m "release 1.1.0" 1.1.0
- update
cabins.env
for prod sudo rm -rf tmp && rm -rf public/assets && RAILS_ENV=production bundle exec rake assets:precompile
- make sure
ProxyPass /assets
is set in conf/httpd-vhosts.conf - docker build -t cabins .
- docker image ls
- docker tag gerstle/cabins:latest
- docker tag gerstle/cabins:1.1.0
- docker login
- docker push gerstle/cabins
- docker-machine create --driver amazonec2 --amazonec2-region us-west-1 --amazonec2-instance-type t2.micro --amazonec2-zone "b" cabins-dev
- (alternatively) docker-machine start/restart/stop cabins-dev
- docker-machine env cabins-dev
- eval $(docker-machine env cabins-dev)
- docker image pull gerstle/cabins
- docker-compose build (needed for web)
- docker-compose up -d
- docker-compose logs -f -t
prod...
- update
cabins.env
for prod - docker-machine env cabins-prod
- eval $(docker-machine env cabins-prod)
- docker image pull gerstle/cabins
- docker-compose build (needed for web)
- docker-compose up -d
http://localhost/rails/mailers/user_mailer/ http://localhost/rails/mailers/reservation_mailer/