Skip to content

Commit

Permalink
updated dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskoenig committed Aug 15, 2024
1 parent 487615d commit 170363f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 61 deletions.
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# -------------------------------------------------------------------------------------
# Container to serve FastAPI backend api from sbmlutils
# sudo docker build -t fastapi-app .
# sudo docker run -p 1444:1444 fastapi-app
# -------------------------------------------------------------------------------------
FROM python:3.12
FROM python:3.12-slim

# Add application code to the image
COPY ./src /code/src
Expand All @@ -16,9 +18,5 @@ WORKDIR /code
# Install sbmlutils
RUN pip install -e . --no-cache-dir --upgrade

#ENV MODULE_NAME="sbmlutils.report.api"
#ENV VARIABLE_NAME="api"
#ENV PORT="1444"

EXPOSE 1444
CMD ["uvicorn", "sbmlutils.report.api:api", "--host", "0.0.0.0", "--port", "1444"]
43 changes: 0 additions & 43 deletions Dockerfile_old

This file was deleted.

13 changes: 6 additions & 7 deletions docker-compose-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# -----------------------------------------------------------------------------
#
# build containers
# docker compose -f docker-compose-develop.yml build --no-cache
# docker compose -f docker-compose-develop.yml build
# sudo docker compose -f docker-compose-develop.yml build --no-cache
# sudo docker compose -f docker-compose-develop.yml build
# serve containers
# docker compose -f docker-compose-develop.yml up --detach
# docker compose -f docker-compose-develop.yml up
# sudo docker compose -f docker-compose-develop.yml up --detach
# sudo docker compose -f docker-compose-develop.yml up
# -----------------------------------------------------------------------------
version: '3'

Expand All @@ -25,10 +25,9 @@ services:
volumes:
- .:/code
expose:
- "80"
- "1444"
ports:
- "1444:80"
# command: ["/start.sh"]
- "1444:1444"

frontend:
restart: always
Expand Down
10 changes: 4 additions & 6 deletions docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# DOCKER COMPOSE DEPLOYMENT
# -----------------------------------------------------------------------------
# build containers
# docker-compose -f docker-compose-production.yml build --no-cache
# docker-compose -f docker-compose-production.yml build
# sudo docker-compose -f docker-compose-production.yml build --no-cache
# sudo docker-compose -f docker-compose-production.yml build
# serve containers
# docker-compose -f docker-compose-production.yml up
# docker-compose -f docker-compose-production.yml up --detach
# sudo docker-compose -f docker-compose-production.yml up
# sudo docker-compose -f docker-compose-production.yml up --detach
# -----------------------------------------------------------------------------
version: '3'

Expand All @@ -26,9 +26,7 @@ services:
expose:
- "1444"
ports:
# - "1444:80"
- "1444:1444"
command: ["/start.sh"]

frontend:
environment:
Expand Down

0 comments on commit 170363f

Please sign in to comment.