Skip to content

Commit

Permalink
docker run with no iteractive tty
Browse files Browse the repository at this point in the history
Falcon deprication bump
  • Loading branch information
calaldees committed Oct 18, 2024
1 parent 1d0402f commit ecd454b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions teachprogramming/lib/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
DOCKER_IMAGE:=site
DOCKER_RUN:=docker run -it --rm \
_DOCKER_RUN:=docker run --rm \
--workdir /app/ \
--volume ${PWD}:/app/ \
--volume ${PWD}/../static:/static/ \
--publish 8000:8000 \
--env PYTHONPATH=./ \
${DOCKER_IMAGE}
--env PYTHONPATH=./
DOCKER_RUN:=${_DOCKER_RUN} -it ${DOCKER_IMAGE}
DOCKER_RUN_no_tty:=${_DOCKER_RUN} ${DOCKER_IMAGE}

serve_static: build_static
open http://localhost:8000/static/
python3 -m http.server
build_static: build_docker
${DOCKER_RUN} python3 api.py /static/projects/ /static/language_reference/languages/ --export
${DOCKER_RUN_no_tty} python3 api.py /static/projects/ /static/language_reference/languages/ --export
build_and_upload: build_static
scp -r ./api/v1 computingteachers.uk:computingteachers.uk/api
scp -r ./static computingteachers.uk:computingteachers.uk
Expand Down
2 changes: 1 addition & 1 deletion teachprogramming/lib/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _filter_file(f):
# Setup App -------------------------------------------------------------------

def create_wsgi_app(project_path=None, language_path=None, **kwargs):
app = falcon.API()
app = falcon.App()
app.add_route(r'/', IndexResource())
app.add_static_route(r'/static', str(Path('static').resolve()))
app.add_route(r'/api/v1/language_reference.json', LanguageReferenceResource(language_path))
Expand Down

0 comments on commit ecd454b

Please sign in to comment.