This project is a full-stack web application that consists of a Vue.js frontend and a Sinatra backend. It is containerized using Docker to ensure a consistent development and deployment environment.
- Docker: Ensure you have Docker installed on your machine. Download Docker
- Docker Compose: Ensure you have Docker Compose installed on your machine. It comes bundled with Docker Desktop.
my-app/
โ docker-compose.yml
โ README.md
โโโโmy-vue-app/
โ โ (rest of your frontend files and directories)
โโโโmy-sinatra-app/
โ (rest of your backend files and directories)
-
Clone the repository:
git clone https://github.com/jerry914/docker-vue-ruby-template.git cd docker-vue-ruby-template -
Build the Docker images:
docker-compose build
-
Start the development servers:
docker-compose up
-
The frontend and backend applications should now be running:
- Frontend: http://localhost:8080
- Backend: http://localhost:4567
-
Stop the Application: To stop the application and the running containers, use the following command:
docker-compose down
The setup supports hot reloading. Changes made to the source code on your machine will automatically reflect in the running containers without requiring a restart.
If needed, you can access the running containers using the following commands:
-
Backend:
docker exec -it my_sinatra_backend /bin/bash -
Frontend:
docker exec -it my_vue_frontend sh
๐ ๏ธ: todo
- publish to hekoku
- env
- database
- CI/CD