Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
FROM node:lts as build
FROM node:lts AS build

WORKDIR /code
COPY . /code

RUN apt-get update && apt-get install -y chromium
RUN make install-deps-typescript && make install-typescript && make frontend

FROM python:3.11.0 as run
FROM python:3.11.0 AS run

COPY --from=build /code /code
WORKDIR /code
RUN apt update &&\
apt install -y python3-numpy &&\
pip install virtualenv &&\
python3 -m venv venv && \
make install-deps-python &&\
make install-python

ENTRYPOINT make dev-flask
ENTRYPOINT make dev-flask-docker
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ upstream-sync:
dev-flask:
. ./venv/bin/activate && INSECURE_REQUESTS=1 FLASK_APP=`pwd`/cre.py FLASK_CONFIG=development flask run

dev-flask-docker:
. ./venv/bin/activate && INSECURE_REQUESTS=1 FLASK_APP=`pwd`/cre.py FLASK_CONFIG=development flask run --host=0.0.0.0

e2e:
yarn build
[ -d "./venv" ] && . ./venv/bin/activate &&\
Expand Down Expand Up @@ -83,7 +86,7 @@ docker-prod:
docker build -f Dockerfile -t opencre:$(shell git rev-parse HEAD) .

docker-dev-run:
docker run -it -p 5000:5000 opencre-dev:$(shell git rev-parse HEAD)
docker run -it -p 127.0.0.1:5000:5000 opencre-dev:$(shell git rev-parse HEAD)

docker-prod-run:
docker run -it -p 5000:5000 opencre:$(shell git rev-parse HEAD)
Expand Down