Skip to content
Snippets Groups Projects
Unverified Commit 98f8f8fa authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Changing the directory to webopenccg insteed of app.

parent 851bfdd2
No related branches found
No related tags found
No related merge requests found
# Local files
app/static/viz.js
app/static/lite.render.js
webopenccg/static/viz.js
webopenccg/static/lite.render.js
# Vim session
*.vim
......
......@@ -25,7 +25,7 @@ RUN curl -o openccg-0.9.5.tgz https://datapacket.dl.sourceforge.net/project/open
tatsu \
pygraphviz
COPY app /app
COPY webopenccg /app
COPY tests /tests
ADD https://github.com/mdaines/viz.js/releases/download/v2.0.0/viz.js \
......@@ -34,11 +34,10 @@ ADD https://github.com/mdaines/viz.js/releases/download/v2.0.0/viz.js \
RUN chmod +r /app/static/viz.js /app/static/lite.render.js
# Run Flask app behind nginx
WORKDIR /app
CMD uwsgi --http :8080 \
--uid www-data \
--manage-script-name \
--module ccgapp \
--module webopenccg \
--callable app \
--master
app/generated_openccg_parser.py: OpenCCG.ebnf
webopenccg/generated_openccg_parser.py: OpenCCG.ebnf
tatsu --generate-parser $< --outfile $@
.PHONY: build
......@@ -6,13 +6,13 @@ build:
docker build . -t web-openccg
# Copy over the viz.js files for the local development server (mounting would otherwise overwrite it)
docker run --rm --detach --name web-openccg web-openccg
docker cp web-openccg:/app/static ./app/static
docker cp web-openccg:/webopenccg/static ./webopenccg/static
docker stop web-openccg
.PHONY: run
run:
docker run --rm -p 5000:5000 -v $$(pwd)/app:/app:ro web-openccg python3 /app/ccgapp.py
docker run --rm -p 5000:5000 -v $$(pwd)/webopenccg:/app:ro web-openccg python3 /app/ccgapp.py
.PHONY: test
test:
docker run --rm -v $$(pwd)/app:/app -v $$(pwd)/tests:/tests:ro web-openccg python3 -m unittest discover /tests
docker run --rm -v $$(pwd)/webopenccg:/app -v $$(pwd)/tests:/tests:ro web-openccg python3 -m unittest discover /tests
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment