2025-01-16 14:17:25 +01:00
|
|
|
# What is it?
|
|
|
|
|
|
|
|
This is just a small Vue.js demo app with a Django Rest API Backend that writes "Todos" to a Postgesql DB.
|
|
|
|
It serves as demo to on how to setup the containerization with docker.
|
|
|
|
|
2025-01-16 19:20:30 +01:00
|
|
|
# How to use/deploy
|
|
|
|
## Simple Way
|
|
|
|
|
|
|
|
Clone the 3 repos into the folder:
|
|
|
|
|
2025-01-16 19:40:24 +01:00
|
|
|
* ```mkdir TestProject && cd TestProject```
|
|
|
|
* ```git clone ssh://git@git.impstyle.com:222/test/demo-docker.git docker```
|
|
|
|
* ```git clone ssh://git@git.impstyle.com:222/test/demo-fronted.git frontend```
|
|
|
|
* ```git clone ssh://git@git.impstyle.com:222/test/demo-backend.git backend```
|
2025-01-16 19:20:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
## SSH git clone via docker compose
|
|
|
|
Have a valid ssh key pair with the Git server provider.
|
|
|
|
adjust the path to the frontend and backend repos inside `docker-compose_ssh_git.yml`
|
|
|
|
run ```docker compose build -f docker-compose_ssh_git.yml --ssh default```
|
|
|
|
|
|
|
|
this path is tricky because you have to do more to make the ssh keys working with the docker compose instance.
|
|
|
|
|
|
|
|
## how to start the application
|
2025-01-16 14:17:25 +01:00
|
|
|
Adjust the .env files.
|
|
|
|
run: ```docker compose up --build```
|
|
|
|
run: ```docker-compose exec backend python manage.py createsuperuser``` and create a user in the backend.
|
|
|
|
the frontend runs on http://localhost:5173
|
|
|
|
|
2025-01-16 14:25:12 +01:00
|
|
|
|
|
|
|
local dev:
|
|
|
|
enables live updates of the code during development, no rebuild needed:
|
|
|
|
```docker-compose -f docker-compose.yml -f docker-compose.override.yml up```
|