This files are needed to start a Rails app though Docker, with the only condition of having installed Docker on your system.
-
I don't want to install anything, is there any link to see the see the project?
- There isn't a Free hosting service to house the app, because all background workers are premium features.
- If you want to the use the app, send me an email to emanuel.rodriguez.bedeman@hotmail.com or message me though linkedin
-
Do I need to install ruby on my pc?
- No, you don't need to install ruby on your system, only Docker
-
Why is this approach is recommended instead of installing ruby and all it's services?
- Because installing Ruby on Rails usually has a lot of differents issues, specially on Windows (the OS I developed the app).
-
If I already have installed Ruby On Rails 7 on my OS, can I still run the app?
- Yes, you can. Just remember to install the same gems's versions, setup redis, sidekiq and the .env variables.
- Keep in mind that the app wasn't made by this method, so I can't guaranteed you that it'll work.
- Create folder on your machine.
- Download this repo.
- Open CLI (cmd for Windows), navigate to the created folder and enter:
docker-compose-build
. - Once is done, enter:
docker-compose run --rm --service-ports ruby_dev
to run the container with it's images. - You'll in Rail's shell, to create a new project enter:
rails new myapp && cd myapp
note: change "myapp" to the name that you want.
- Run the server by using:
rails server -p $PORT -b 0.0.0.0
. - Enter http://localhost:3000/ in your browser to enter the app.
- Open a new CLI (don't worry about the directory).
- Type:
docker ps
to see all the running containers. - Search for the one saying "schedule tweets" and copy it's ID.
- Enter:
docker exec -it container_id bash
(replacecontainer_id
for the copied ID) to enter debugging mode. - Once again, you'll be in Rail's shell.
- To start the schedule tweet's jobs, enter:
bundle exec sidekiq
. - That's it! Now you'll have the app running with all it's functions and you can use / explore / modify it as you please.