This repository was archived by the owner on Dec 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,6 @@ COPY . /code/
3838
3939RUN python manage.py collectstatic --noinput
4040
41- RUN python manage.py createcachetable
42-
4341EXPOSE 8000
4442
4543# replace demo.wsgi with <project_name>.wsgi
Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ fly launch --dockerfile Dockerfile
4545
4646Now say YES when asked if you want to create a Postgres DB.
4747
48- > We recommend using the database_url( pip install dj-database-url) to parse the DATABASE_URL from os.environ[ 'DATABASE_URL']
48+ > We recommend using the database_url ( ` pip install dj-database-url ` ) to parse the DATABASE_URL from os.environ[ 'DATABASE_URL']
4949>
50- > For detailed documentation, see https://fly.dev/docs/django/
50+ > For detailed documentation, see < https://fly.dev/docs/django/ >
5151
5252Why not - changed configuration style to use ` dj-database-uri ` .
5353
@@ -155,6 +155,14 @@ Add to `tly.toml`:
155155
156156Then ` flyctl deploy ` .
157157
158+ ## Connect to database
159+
160+ ``` bash
161+ fly proxy 15432:5432 -a optimap-db
162+ ```
163+
164+ Connect to database locally at port ` 15432 ` , e.g., with pgAdmin.
165+
158166## Future
159167
160168- Database backups, see < https://www.joseferben.com/posts/django-on-flyio/ >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ processes = []
99 dockerfile = " Dockerfile"
1010
1111[deploy ]
12- release_command = " python manage.py migrate "
12+ release_command = " sh release_command.sh "
1313
1414[env ]
1515 OPTIMAP_ALLOWED_HOST = " optimap.science,optimap.fly.dev"
Original file line number Diff line number Diff line change 1+ #! /bin/sh -e
2+ python manage.py migrate
3+ python manage.py createcachetable
You can’t perform that action at this time.
0 commit comments