33 lines
1.3 KiB
Markdown
33 lines
1.3 KiB
Markdown
# 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.
|
|
|
|
# How to use/deploy
|
|
## Simple Way
|
|
|
|
Clone the 3 repos into the folder:
|
|
|
|
```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```
|
|
|
|
|
|
## 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
|
|
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
|
|
|
|
|
|
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```
|