mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-21 07:22:53 +08:00
updated prod to use felicity-lims cli command
This commit is contained in:
parent
8acd74ba92
commit
252f5765c0
3 changed files with 9 additions and 9 deletions
|
@ -19,10 +19,10 @@ RUN apt-get update && apt-get install -y git libpq-dev gcc
|
|||
COPY ./requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
|
||||
WORKDIR /app
|
||||
COPY ./felicity /app/felicity
|
||||
COPY . /app
|
||||
RUN rm -rf /app/felicity/templates/static/*
|
||||
COPY --from=webapp-build /app/dist /app/felicity/templates/static
|
||||
# RUN cd /app/felicity && alembic upgrade head
|
||||
RUN cd /app && pip install -e .
|
||||
ENV PYTHONPATH=/app
|
||||
CMD ["gunicorn", "felicity.main:felicity", "--bind", "0.0.0.0:8000", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker"]
|
||||
|
||||
|
@ -32,9 +32,9 @@ RUN apt-get update && apt-get install -y git libpq-dev gcc
|
|||
COPY ./requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
|
||||
WORKDIR /app
|
||||
COPY ./felicity /app/felicity
|
||||
COPY . /app/
|
||||
RUN rm -rf /app/felicity/templates/static/*
|
||||
# RUN cd /app/felicity && alembic upgrade head
|
||||
RUN cd /app && pip install -e .
|
||||
ENV PYTHONPATH=/app
|
||||
CMD ["gunicorn", "felicity.main:felicity", "--bind", "0.0.0.0:8000", "--workers", "4", "--worker-class", "uvicorn.workers.UvicornWorker"]
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ Docker service presets are: *felicity-aio-caddy*, *felicity-aio-nginx*, *felicit
|
|||
|
||||
```commandline
|
||||
docker compose -f ./docker-compose.prod.yml up -d your_preset --build
|
||||
docker compose -f docker-compose.prod.yml exec your_preset bash -c "cd felicity && alembic upgrade head"
|
||||
docker compose -f docker-compose.prod.yml exec your_preset bash -c "felicity-lims upgrade"
|
||||
docker compose -f docker-compose.prod.yml logs your_preset -f -n100
|
||||
```
|
||||
|
||||
|
@ -83,13 +83,14 @@ Docker service presets are: *felicity-static-nginx*, *felicity-static-caddy*
|
|||
|
||||
```commandline
|
||||
docker compose -f ./docker-compose.prod.yml up -d your_preset --build
|
||||
docker compose -f docker-compose.prod.yml exec your_preset bash -c "cd felicity && alembic upgrade head"
|
||||
docker compose -f docker-compose.prod.yml exec your_preset bash -c "felicity-lims upgrade"
|
||||
docker compose -f docker-compose.prod.yml logs your_preset -f -n100
|
||||
```
|
||||
|
||||
##### Alternative deployment method without docker
|
||||
|
||||
If you don't want to use docker, as an alternative we recommend supervisor.
|
||||
If you don't want to use docker, as an alternative we recommend supervisor. With this approach you will have
|
||||
to setup databases (postgres, mongo), minio, redis/dragonfly manually by yourself
|
||||
|
||||
```shell
|
||||
# install os requirements
|
||||
|
@ -103,7 +104,7 @@ conda activate felicity
|
|||
pip install -r requirements.txt;
|
||||
|
||||
# setup postgres - First create a database and user
|
||||
pnpm db:al:upgrade;
|
||||
pnpm db:upgrade;
|
||||
|
||||
# install webapp dependencies using pnpm - we recommend node v18 +
|
||||
pnpm i;
|
||||
|
|
|
@ -41,7 +41,6 @@ typing-extensions==4.11.0
|
|||
async-cache==1.1.1
|
||||
minio==7.2.7
|
||||
motor==3.5.1
|
||||
meilisearch==0.31.4
|
||||
redis[hiredis]==5.0.8
|
||||
asyncio_redis==0.16.0
|
||||
typer==0.12.3
|
||||
|
|
Loading…
Reference in a new issue