Skip to content

Commit

Permalink
Created 'music' server-side app and bind mounted server directory + u…
Browse files Browse the repository at this point in the history
…pdated requirements.txt file
  • Loading branch information
forreya committed Jan 12, 2025
1 parent 195c695 commit bf95ee1
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 3 deletions.
21 changes: 21 additions & 0 deletions db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Beow DB

## How To Connect

1. The database runs as an individual docker container so you need to connect through using `docker exec`:

```
docker exec -it beow_db /bin/bash
```

2. Once you're in, connect to PostgreSQL as follows:

```
psql -h localhost -p 5432 -U admin beow_db
```

3. Show all tables:

```
\dt
```
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ services:
dockerfile: Dockerfile
ports:
- "2809:2809"
volumes:
- ./server:/server # bind mount
depends_on:
database:
condition: service_healthy
Expand Down
6 changes: 6 additions & 0 deletions reminders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Beow App

This file is to remind myself what I was up to in the previous session so I can easily get back on track with the same ideas / solutions I was having.

- MUST perform all server side migrations + database related changes from the docker container (the local directory doesn't connect to the database)
- Binded the entire server directory to the docker equivalent just like the client directory
Empty file added server/music/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions server/music/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions server/music/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class MusicConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'music'
Empty file.
3 changes: 3 additions & 0 deletions server/music/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions server/music/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
3 changes: 3 additions & 0 deletions server/music/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
7 changes: 4 additions & 3 deletions server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
asgiref==3.8.1
Django==5.1.2
sqlparse==0.5.1
psycopg[binary]==3.2.3
Django==5.1.4
sqlparse==0.5.3
psycopg2-binary==2.9.10
djangorestframework==3.15.2

0 comments on commit bf95ee1

Please sign in to comment.