Installation
January 14, 2026 ยท View on GitHub
-
Install docker on your machine. Follow the official guideline on docker.com.
-
Create a fork of the repo
-
Clone repo
git clone https://github.com/[USER_NAME]/lobsters.git -
Run
make docker-serve- This will pull a mariadb image and start two containers: one for web and another for the database
-
Change the credentials:
- Create a new terminal tab
- Run
docker compose run app bash - Run
EDITOR=vim rails credentials:edit- Note: This will open vim in the container
- Copy content from
config/credentials.yml.enc.sampleand paste it in the vim editor by right clicking on your mouse and clicking paste - To save your changes and exit vim press
:key, typewqand press enter - You should get a similar image like this:

-
Switch back to the tab running the mariadb image and restart the server by:
- Holding down
controlandc - Run
make docker-serve - You should see something like this:

- Holding down
-
In another terminal, Run
docker compose run app bin/setup -
Create the fake data by running
docker compose run app rails fake_data- Note: this will take 2-5 minutes
-
Confirm the server is running by navigating to
http://0.0.0.0:3000
Common errors
Solution: Redo step "Change the credentials":
Solution:
- Run
docker compose run app db:drop - Redo steps starting at "Switch back to the tab running the mariadb image and restart the server by:"
- Replace this in your
docker-compose.yamlfile:
- - db_data:/var/lib/mysql
+ - ./sql_data:/var/lib/mysql:rw,delegated
Debugging in Docker
- Open a new terminal
- Run your app server:
- IF your app server is running, Run
docker attach <CONTAINER_NAME>- Example:
docker attach lobsters-app - You can check if it is running by running
docker psand if you see something similar by the below image, then the app server is running
- Example:
- IF you app server is not running, Run
docker compose run --rm --service-ports app--rmensures that you do not create orphaned containers
- IF your app server is running, Run
- Add
byebugto the file you wish to add a break point and debug. - Happy debugging!
Running tests in Docker
- Run
docker compose run app rspec