diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..49ef682 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +.git +.github +.dockerignore +.gitattributes +.gitignore +.idea +.vscode + +__pycache__/ +*.py[cod] +*$py.class +*.so +htmlcov/ +.coverage +.coverage.* +.pylintrc +.pytest_cache/ +.venv +venv + +.DS_Store +.AppleDouble +.LSOverride +._* + +*/node_modules +*/dist +*/data/db +*/mealie/test +*/mealie/.temp + +model.crfmodel + +crowdin.yml diff --git a/backend/core/logger/logconf.prod.json b/backend/core/logger/logconf.prod.json index f36ee70..1103fd2 100644 --- a/backend/core/logger/logconf.prod.json +++ b/backend/core/logger/logconf.prod.json @@ -39,7 +39,7 @@ "class": "logging.handlers.RotatingFileHandler", "level": "DEBUG", "formatter": "detailed", - "filename": "${DATA_DIR}/fuware.log", + "filename": "data/fuware.log", "maxBytes": 10000, "backupCount": 3 } diff --git a/docker/Dockerfile b/docker/Dockerfile index 1b1e4c3..c74edb6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.20.4-alpine3.20 as builder +FROM node:18.20.4-alpine3.20 AS builder WORKDIR /app @@ -13,7 +13,7 @@ RUN pnpm build ############################################### # Base Image - Python ############################################### -FROM python:3.10-slim as python-base +FROM python:3.10-slim AS python-base ENV FUWARE_HOME="/app" @@ -39,7 +39,7 @@ RUN useradd -u 911 -U -d $FUWARE_HOME -s /bin/bash abc \ ############################################### # Builder Image ############################################### -FROM python-base as builder-base +FROM python-base AS builder-base RUN apt-get update \ && apt-get install --no-install-recommends -y \ curl \ @@ -66,7 +66,7 @@ RUN poetry install --only main ############################################### # Production Image ############################################### -FROM python-base as production +FROM python-base AS production ENV PRODUCTION=true ENV TESTING=false @@ -106,8 +106,6 @@ ENV APP_PORT=9000 EXPOSE ${APP_PORT} -HEALTHCHECK CMD python $FUWARE_HOME/backend/scripts/healthcheck.py || exit 1 - # ---------------------------------- # Copy Frontend diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 5a04040..ffda285 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,14 +1,14 @@ services: - mealie: - container_name: mealie - image: mealie:dev + fuware: + container_name: fuware + image: fuware:dev build: context: ../ target: production dockerfile: ./docker/Dockerfile restart: always volumes: - - mealie-data:/app/data/ + - fuware-data:/app/data/ ports: - 9091:9000 environment: @@ -26,5 +26,5 @@ services: # SMTP_PASSWORD= volumes: - mealie-data: + fuware-data: driver: local diff --git a/docker/entry.sh b/docker/entry.sh index 24a6b4b..71f514e 100644 --- a/docker/entry.sh +++ b/docker/entry.sh @@ -41,4 +41,4 @@ init # Start API HOST_IP=`/sbin/ip route|awk '/default/ { print $3 }'` -exec python /app/fuware/main.py +exec python /app/backend/main.py