Aplicação de crud básico em Ruby
Quando o Rails recebe a URL, ele primeiro procura a URI no arquivo, que define, por padrão, todas as rotas da aplicação. Cada URI válido é mapeado para uma função localizada dentro de um Controlador, que é invocado para fornecer uma resposta à solicitação.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Docker
Linux Debian
Ruby on Rails
Tailwind CSS
Nginx Server
Passenger
curl https://releases.rancher.com/install-docker/20.10.sh | sh
echo 'sudo gpasswd -a $USER docker' >> ~/.bashrc
echo 'sudo chmod 666 /var/run/docker.sock' >> ~/.bashrc
echo 'sudo /etc/init.d/docker start' >> ~/.bashrc
source ~/.bashrc
A step by step series of examples that tell you how to get a development env running.
echo "# crud-ruby" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/erivandosena/crud-ruby.git
git push -u origin main
Send to repository
git remote add origin https://github.com/erivandosena/crud-ruby.git
git branch -M main
git push -u origin main
Clean Docker Workspace local
docker stop $(docker ps -qa)
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -qa)
docker volume rm -f $(docker volume ls -q)
docker network rm $(docker network ls -q)
End with an example of getting some data out of the system or using it for a little demo.
docker build -f ./Dockerfile -t erivando/app-crud-ruby:latest --build-arg VERSION=1.0.0 --build-arg COMMIT_SHA=$(git rev-parse HEAD) --no-cache .
docker tag erivando/app-crud-ruby:latest erivando/app-crud-ruby:v1.0.0
docker login
docker push erivando/app-crud-ruby:v1.0.0
docker compose build --no-cache && docker compose up -d
docker compose exec app-crud bash
docker compose logs -f -t app-crud
docker compose down
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
docker run -it --rm -d -p 8030:80 --name app-crud --network=bridge erivando/app-crud-ruby:latest
docker exec -it app-crud /bin/bash
docker logs -f --tail --until=2s app-crud
docker rm -f app-crud
Image Docker: https://hub.docker.com/r/erivando/app-crud-ruby
- @erivandosena - Idea & Initial work
- Hat tip to anyone whose code was used
- Inspiration
- References