Fix dockerfile
parent
cfe64fbbf5
commit
ba15e548df
|
@ -34,7 +34,7 @@ You can find the code for the mining engine in `oapen-engine/`.
|
|||
* Most popular PostgreSQL database adapter for Python
|
||||
* `pandas` -- data analysis library
|
||||
* Maintained by [PYData](https://pandas.pydata.org/) with large amounts of sponsors. 2,700+ contributors.
|
||||
* `sklearn` -- Scikit Learn
|
||||
* `scikit-learn` -- Scikit Learn
|
||||
* Maintained by [a large consortium of corporations and open-source developers](https://scikit-learn.org/stable/).
|
||||
|
||||
|
||||
|
|
|
@ -2,21 +2,21 @@ version: "3.8"
|
|||
services:
|
||||
oapen-engine :
|
||||
build: ./oapen-engine/
|
||||
db:
|
||||
image: postgres:14.1-alpine
|
||||
restart: always
|
||||
environment:
|
||||
# TODO change
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=postgres
|
||||
ports:
|
||||
- '5432:5432'
|
||||
volumes:
|
||||
- db:/var/lib/postgresql/data
|
||||
api:
|
||||
build: ./api/
|
||||
web:
|
||||
build: ./web/
|
||||
# db:
|
||||
# image: postgres:14.1-alpine
|
||||
# restart: always
|
||||
# environment:
|
||||
# # TODO change
|
||||
# - POSTGRES_USER=postgres
|
||||
# - POSTGRES_PASSWORD=postgres
|
||||
# ports:
|
||||
# - '5432:5432'
|
||||
# volumes:
|
||||
# - db:/var/lib/postgresql/data
|
||||
# api:
|
||||
# build: ./api/
|
||||
# web:
|
||||
# build: ./web/
|
||||
volumes:
|
||||
db:
|
||||
driver: local
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
FROM python:3.10-slim as base
|
||||
|
||||
RUN apt update
|
||||
RUN apt install build-essential -y --no-install-recommends
|
||||
|
||||
# Setup env
|
||||
ENV LANG C.UTF-8
|
||||
ENV LC_ALL C.UTF-8
|
||||
|
@ -15,8 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends gcc
|
|||
|
||||
# Install python dependencies in /.venv
|
||||
COPY Pipfile .
|
||||
COPY Pipfile.lock .
|
||||
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
|
||||
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy --skip-lock
|
||||
|
||||
|
||||
FROM base AS runtime
|
||||
|
@ -32,6 +34,6 @@ USER appuser
|
|||
|
||||
# Install application into container
|
||||
COPY . .
|
||||
|
||||
# ENTRYPOINT ["/bin/bash"]
|
||||
# Run the application
|
||||
ENTRYPOINT ["python", "tasks/generate_suggestions.py"]
|
||||
ENTRYPOINT ["make", "run-docker"]
|
||||
|
|
|
@ -32,3 +32,6 @@ run-tests:
|
|||
|
||||
refresh-items:
|
||||
cd src && $(PYTHONEX) -m pipenv run python tasks/refresh_items.py
|
||||
|
||||
run-docker:
|
||||
cd src && python tasks/refresh_items.py
|
|
@ -8,7 +8,7 @@ nltk = "*"
|
|||
requests = "*"
|
||||
psycopg2-binary = "*"
|
||||
pandas = "*"
|
||||
sklearn = "*"
|
||||
scikit-learn = "*"
|
||||
lxml = "*"
|
||||
psutil = "*"
|
||||
|
||||
|
|
Loading…
Reference in New Issue