-
docker images
- rails-app
- ruby:2.7.2 (nginx,puma,supervisor)
- rails-db
- mysql:8.0.27
- rails-redis
- rails-app
-
git clone or fork
mkdir -p ~/git/github
cd ~/git/github
git clone [email protected]:RVIRUS0817/dev_rails.git
- add localhost /etc/hosts
sudo vim /etc/hosts
127.0.0.1 dev.adachin.com
- docker run
cd dev_rails
cp .env.example .env
cd docker/dev
docker-compose up -d
- app deploy
docker exec -it rails-app bash
yarn install
bundle install
rails db:migrate
/usr/bin/supervisorctl restart app
- Access
- DB login
docker exec -it rails-app bash
mysql -u root -h db -p
- redis login
docker exec -it rails-app bash
redis-cli -h redis
docker exec -it rails-app bash
supervisorctl stop app
bundle exec rails s
bundle exec rails new app
RUN docker/dev-micro
https://github.com/RVIRUS0817/dev_rails/tree/master/docker/dev-micro