File tree Expand file tree Collapse file tree 4 files changed +37
-25
lines changed
Expand file tree Collapse file tree 4 files changed +37
-25
lines changed Original file line number Diff line number Diff line change 1616"""
1717from django .contrib import admin
1818from django .urls import path
19+ from . import views
1920
2021urlpatterns = [
2122 path ('admin/' , admin .site .urls ),
23+ path ('' , views .index , name = 'index' ),
24+ path ('health/' , views .health , name = 'health' ),
2225]
Original file line number Diff line number Diff line change 1+ from django .http import HttpResponse , JsonResponse
2+
3+
4+ def index (request ):
5+ return HttpResponse ("Hello, world!" )
6+
7+
8+ def health (request ):
9+ return JsonResponse ({"status" : "ok" })
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ services:
5050 sh -c "mkdir -p /var/run/tailscale &&
5151 tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock &
5252 sleep 5 &&
53- tailscale up --authkey=$${TS_AUTHKEY} --hostname=$${TS_HOSTNAME} --accept-routes &&
54- tailscale serve --bg https+insecure / http://nginx:80 &&
53+ tailscale up --authkey=$${TS_AUTHKEY} --hostname=$${TS_HOSTNAME} --accept-routes --advertise-tags=tag:web-public &&
54+ tailscale funnel --bg http://nginx:80 &&
5555 wait"
5656 db :
5757 image : postgis/postgis:16-3.4
@@ -103,7 +103,7 @@ services:
103103 DOCKER_API_VERSION : " 1.44"
104104 REPO_USER : ${GH_USERNAME}
105105 REPO_PASS : ${GH_PAT}
106- command : --label-enable --interval 60 --cleanup
106+ command : --label-enable --interval 20 --cleanup
107107 restart : always
108108volumes :
109109 postgres_data :
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
2- """Django's command-line utility for administrative tasks."""
3- import os
4- import sys
5-
6-
7- def main ():
8- """Run administrative tasks."""
9- os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'config.settings' )
10- try :
11- from django .core .management import execute_from_command_line
12- except ImportError as exc :
13- raise ImportError (
14- "Couldn't import Django. Are you sure it's installed and "
15- "available on your PYTHONPATH environment variable? Did you "
16- "forget to activate a virtual environment?"
17- ) from exc
18- execute_from_command_line (sys .argv )
19-
20-
21- if __name__ == '__main__' :
22- main ()
1+ #!/usr/bin/env python
2+ """Django's command-line utility for administrative tasks."""
3+ import os
4+ import sys
5+
6+
7+ def main ():
8+ """Run administrative tasks."""
9+ os .environ .setdefault ('DJANGO_SETTINGS_MODULE' , 'config.settings' )
10+ try :
11+ from django .core .management import execute_from_command_line
12+ except ImportError as exc :
13+ raise ImportError (
14+ "Couldn't import Django. Are you sure it's installed and "
15+ "available on your PYTHONPATH environment variable? Did you "
16+ "forget to activate a virtual environment?"
17+ ) from exc
18+ execute_from_command_line (sys .argv )
19+
20+
21+ if __name__ == '__main__' :
22+ main ()
You can’t perform that action at this time.
0 commit comments