This moves the backend code into backend/
Adds the balancer-frontend code into frontend/
Testing
pull this branch and open a command line
Build the backend docker image with cd backend; make
Then you can go back to the root of the repo cd .. and run docker compose up. You should see the frontend running on localhost:3000 and django backend on localhost:8000 and the pgsql datbase running.
Attaching to balancer-backend-backend-1, balancer-backend-db-1, balancer-backend-frontend-1
balancer-backend-backend-1 | wait-for-it.sh: waiting 15 seconds for db:5432
balancer-backend-db-1 |
balancer-backend-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
balancer-backend-db-1 |
balancer-backend-db-1 | 2023-07-21 15:00:33.297 UTC [1] LOG: starting PostgreSQL 15.3 on aarch64-unknown-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
balancer-backend-db-1 | 2023-07-21 15:00:33.297 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
balancer-backend-db-1 | 2023-07-21 15:00:33.297 UTC [1] LOG: listening on IPv6 address "::", port 5432
balancer-backend-db-1 | 2023-07-21 15:00:33.300 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
balancer-backend-db-1 | 2023-07-21 15:00:33.325 UTC [25] LOG: database system was shut down at 2023-07-21 14:55:53 UTC
balancer-backend-db-1 | 2023-07-21 15:00:33.360 UTC [1] LOG: database system is ready to accept connections
balancer-backend-frontend-1 |
balancer-backend-frontend-1 | > balancer@0.0.0 dev
balancer-backend-frontend-1 | > vite --host
balancer-backend-frontend-1 |
balancer-backend-db-1 | 2023-07-21 15:00:33.810 UTC [29] LOG: incomplete startup packet
balancer-backend-backend-1 | wait-for-it.sh: db:5432 is available after 1 seconds
balancer-backend-frontend-1 |
balancer-backend-frontend-1 | VITE v4.3.9 ready in 489 ms
balancer-backend-frontend-1 |
balancer-backend-frontend-1 | ➜ Local: http://localhost:3000/
balancer-backend-frontend-1 | ➜ Network: http://172.20.0.4:3000/
balancer-backend-backend-1 | Watching for file changes with StatReloader
balancer-backend-backend-1 | Performing system checks...
balancer-backend-backend-1 |
balancer-backend-backend-1 | System check identified no issues (0 silenced).
balancer-backend-backend-1 |
balancer-backend-backend-1 | You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
balancer-backend-backend-1 | Run 'python manage.py migrate' to apply them.
balancer-backend-backend-1 | July 21, 2023 - 15:00:34
balancer-backend-backend-1 | Django version 4.2.3, using settings 'balancer.settings'
balancer-backend-backend-1 | Starting development server at http://0.0.0.0:8000/
balancer-backend-backend-1 | Quit the server with CONTROL-C.
balancer-backend-backend-1 |
This moves the backend code into
backend/
Adds the balancer-frontend code intofrontend/
Testing
cd backend; make
cd ..
and rundocker compose up
. You should see the frontend running on localhost:3000 and django backend on localhost:8000 and the pgsql datbase running.