Skip to content

Commit 521fddf

Browse files
committed
Updated to nested directory format
1 parent 80e40a0 commit 521fddf

140 files changed

Lines changed: 98 additions & 104 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,5 @@ target
155155
# Project
156156
staticfiles/
157157
*.csv
158-
*.xlsx
158+
*.xlsx
159+
*/migrations/*

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ RUN uv run sync
1717

1818
# Copy across the rest of the files
1919
COPY . .
20+
WORKDIR physics_workload

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,33 +121,33 @@ print-%:
121121
data: site school unit task
122122

123123
site:
124-
uv run manage.py loaddata site info
124+
uv run physics_workload/manage.py loaddata site info
125125

126126
school: site
127-
uv run manage.py loaddata standard_load academic_group
127+
uv run physics_workload/manage.py loaddata standard_load academic_group
128128

129129
staff: school
130-
uv run manage.py shell < ./scripts/import_staff_from_csv.py
130+
uv run physics_workload/manage.py shell < ./scripts/import_staff_from_csv.py
131131

132132
unit: school
133-
uv run manage.py loaddata load_function
134-
uv run manage.py shell < ./scripts/import_units_from_csv.py
133+
uv run physics_workload/manage.py loaddata load_function
134+
uv run physics_workload/manage.py shell < ./scripts/import_units_from_csv.py
135135

136136
task: unit staff
137-
uv run manage.py shell < ./scripts/import_nonunit_tasks_from_csv.py
138-
uv run manage.py shell < ./scripts/import_unit_tasks_from_csv.py
137+
uv run physics_workload/manage.py shell < ./scripts/import_nonunit_tasks_from_csv.py
138+
uv run physics_workload/manage.py shell < ./scripts/import_unit_tasks_from_csv.py
139139

140140
database:
141-
-rm -rf app/migrations/*.py
141+
-rm -rf physics_workload/app/migrations/*.py
142142
-rm data/db.sqlite3
143-
touch app/migrations/__init__.py
144-
uv run manage.py makemigrations
145-
uv run manage.py migrate
143+
touch physics_workload/app/migrations/__init__.py
144+
uv run physics_workload/manage.py makemigrations
145+
uv run physics_workload/manage.py migrate
146146

147147
superuser:
148-
uv run manage.py shell < ./scripts/make_swm1r18_superuser.py
148+
uv run physics_workload/manage.py shell < ./scripts/make_swm1r18_superuser.py
149149

150150
initialise:
151-
uv run manage.py initialise
151+
uv run physics_workload/manage.py initialise
152152

153153
all: database data initialise

Procfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker-compose.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
services:
2-
physics_workload_nginx:
2+
nginx:
33
container_name: physics-workload-nginx
44
image: nginx:latest
55
ports:
66
- "80:80"
77
- "443:443"
88
volumes:
99
- type: bind
10-
source: "./nginx/app.conf"
10+
source: "${PROJECT_PATH}/nginx/app.conf"
1111
target: "/etc/nginx/conf.d/default.conf"
1212
- type: bind
13-
source: "./nginx/"
13+
source: "${PROJECT_PATH}/nginx/"
1414
target: "/var/www/physics-workload/nginx/"
1515
- type: bind
16-
source: "./staticfiles/"
16+
source: "${PROJECT_PATH}/staticfiles/"
1717
target: "/var/www/physics-workload/staticfiles/"
1818
- type: bind
1919
source: "/etc/tls/certs/"
@@ -22,34 +22,36 @@ services:
2222
source: "/etc/tls/private/"
2323
target: "/etc/tls/private/"
2424
- type: bind
25-
source: "./logs/"
25+
source: "${PROJECT_PATH}/logs/"
2626
target: "/var/www/physics-workload/logs/"
2727

2828
restart: unless-stopped
2929
depends_on:
30-
- physics_workload_django
30+
- web
3131

32-
physics_workload_django:
32+
web:
3333
container_name: physics-workload-django
3434
build:
3535
dockerfile: Dockerfile
3636
context: .
3737
expose:
3838
- "8000"
39+
ports:
40+
- "8000:8000"
3941
env_file:
4042
- "./.env.default"
4143
- "./.env"
4244
volumes:
4345
- type: bind
44-
source: "./data/"
46+
source: "${PROJECT_PATH}/data/"
4547
target: "/var/www/physics-workload/data/"
4648
- type: bind
47-
source: "./staticfiles/"
49+
source: "${PROJECT_PATH}/staticfiles/"
4850
target: "/var/www/physics-workload/staticfiles/"
4951
- type: bind
50-
source: "./logs/"
52+
source: "${PROJECT_PATH}/logs/"
5153
target: "/var/www/physics-workload/logs/"
5254
command:
5355
- "bash"
54-
- "docker_entrypoint_django.sh"
56+
- "docker-entrypoint.sh"
5557
restart: unless-stopped

package.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)