update admin Docker for development and production use

This commit is contained in:
einhornimmond 2025-05-05 13:25:20 +02:00
parent 22628ac40c
commit 5e38ebf3bb
13 changed files with 88 additions and 175 deletions

3
.env.git Normal file
View File

@ -0,0 +1,3 @@
BUILD_COMMIT=e7b1c19bc8a0d0ed73aeaa98283be3e47af47831
BUILD_COMMIT_SHORT=e7b1c19bc
BUILD_VERSION=b2.3.1.1425-861-ge7b1c19bc

1
.gitignore vendored
View File

@ -9,7 +9,6 @@ nbproject
.metadata .metadata
/out/* /out/*
/.env /.env
.env.git
package-lock.json package-lock.json
/deployment/bare_metal/.env /deployment/bare_metal/.env
/deployment/bare_metal/nginx/sites-available/gradido.conf /deployment/bare_metal/nginx/sites-available/gradido.conf

View File

@ -1,7 +0,0 @@
#!/bin/bash
echo "Writing build metadata to .env.git"
cat > .env.git <<EOF
export BUILD_COMMIT=$(git rev-parse HEAD)
export BUILD_COMMIT_SHORT=$(git rev-parse --short HEAD)
export BUILD_VERSION=$(git describe --tags --always)
EOF

View File

@ -1 +0,0 @@
turbo lint

View File

@ -1,4 +1,5 @@
node_modules node_modules
.git .git
.gitignore .gitignore
!.eslintignore !.eslintignore
!.env.git

View File

@ -3,6 +3,7 @@
################################################################################## ##################################################################################
FROM node:18.20.7-alpine3.21 as base FROM node:18.20.7-alpine3.21 as base
ENV TURBO_CACHE_DIR=/tmp/turbo
# ENVs (available in production aswell, can be overwritten by commandline or env file) # ENVs (available in production aswell, can be overwritten by commandline or env file)
## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame ## DOCKER_WORKDIR would be a classical ARG, but that is not multi layer persistent - shame
ENV DOCKER_WORKDIR="/app" ENV DOCKER_WORKDIR="/app"
@ -19,6 +20,8 @@ ENV BUILD_COMMIT_SHORT=${BUILD_COMMIT_SHORT}
ARG NODE_ENV="production" ARG NODE_ENV="production"
## App relevant Envs ## App relevant Envs
ENV PORT="8080" ENV PORT="8080"
## Timezone
ENV TZ=UTC
# Labels # Labels
LABEL org.label-schema.build-date="${BUILD_DATE}" LABEL org.label-schema.build-date="${BUILD_DATE}"
@ -36,6 +39,10 @@ LABEL maintainer="support@ogradido.net"
# Install Additional Software # Install Additional Software
## install: git ## install: git
#RUN apk --no-cache add git #RUN apk --no-cache add git
# RUN bun add --global yarn@1.22.20
RUN yarn global add bun
# Add bun's global bin directory to PATH
ENV PATH="/root/.bun/bin:${PATH}"
# Settings # Settings
## Expose Container Port ## Expose Container Port
@ -45,6 +52,16 @@ EXPOSE ${PORT}
RUN mkdir -p ${DOCKER_WORKDIR} RUN mkdir -p ${DOCKER_WORKDIR}
WORKDIR ${DOCKER_WORKDIR} WORKDIR ${DOCKER_WORKDIR}
##################################################################################
# Development ####################################################################
##################################################################################
FROM base AS development
# used for getting git commit hash direct from .git
RUN apk update && apk add --no-cache git
# Run command
CMD /bin/sh -c "bun install --frozen-lockfile && bun turbo admin#dev --env-mode=loose"
################################################################################## ##################################################################################
# Base with turbo ################################################################ # Base with turbo ################################################################
@ -52,9 +69,8 @@ WORKDIR ${DOCKER_WORKDIR}
FROM base as turbo-base FROM base as turbo-base
RUN apk update && apk add --no-cache libc6-compat \ RUN apk update && apk add --no-cache libc6-compat \
&& yarn global add turbo@^2 \ && bun add --global turbo@^2 \
&& rm -rf /tmp/* ~/.cache node_modules/.cache \ && rm -rf /tmp/* ~/.cache node_modules/.cache
&& yarn cache clean
################################################################################## ##################################################################################
# BUILDER (create partly monorepo only with data needed by admin) ################ # BUILDER (create partly monorepo only with data needed by admin) ################
@ -77,8 +93,12 @@ RUN yarn install --frozen-lockfile --production=false \
# Build the project # Build the project
COPY --chown=app:app --from=builder /app/out/full/ . COPY --chown=app:app --from=builder /app/out/full/ .
# TODO: get the actually git commit hash into docker
ENV BUILD_COMMIT='deadbeefdeadbeefdeadbeefdeadbeefdeadbeef'
ENV BUILD_COMMIT_SHORT='deadbeef'
ENV BUILD_VERSION='broken'
RUN turbo build --env-mode=loose RUN turbo build --env-mode=loose
################################################################################## ##################################################################################
# TEST ########################################################################### # TEST ###########################################################################
################################################################################## ##################################################################################
@ -92,8 +112,11 @@ CMD /bin/sh -c "turbo admin#test --env-mode=loose"
################################################################################## ##################################################################################
FROM lipanski/docker-static-website:latest as production FROM lipanski/docker-static-website:latest as production
EXPOSE 8080
# tiny static webserver # tiny static webserver
# https://lipanski.com/posts/smallest-docker-image-static-website # https://lipanski.com/posts/smallest-docker-image-static-website
# copy builded frontend files # copy builded frontend files
COPY --from=installer /app/admin/build/ ./admin/ COPY --from=installer /app/admin/build/ ./admin/

View File

@ -11,7 +11,6 @@
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.4", "@biomejs/biome": "1.9.4",
"husky": "^9.1.7",
}, },
}, },
"admin": { "admin": {
@ -1968,8 +1967,6 @@
"humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
"husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="],
"hypercore-crypto": ["hypercore-crypto@3.6.0", "", { "dependencies": { "b4a": "^1.6.6", "compact-encoding": "^2.15.0", "sodium-universal": "^5.0.0" } }, "sha512-0slkW1wzq4B95SD8Z5nt1Yf/3KrIcGsBWTJTsCjHzMXie+sZ5I2IkWcxX1mo4+c0xVESnKAKphKSpGf2kf2BGA=="], "hypercore-crypto": ["hypercore-crypto@3.6.0", "", { "dependencies": { "b4a": "^1.6.6", "compact-encoding": "^2.15.0", "sodium-universal": "^5.0.0" } }, "sha512-0slkW1wzq4B95SD8Z5nt1Yf/3KrIcGsBWTJTsCjHzMXie+sZ5I2IkWcxX1mo4+c0xVESnKAKphKSpGf2kf2BGA=="],
"i18n": ["i18n@0.15.1", "", { "dependencies": { "@messageformat/core": "^3.0.0", "debug": "^4.3.3", "fast-printf": "^1.6.9", "make-plural": "^7.0.0", "math-interval-parser": "^2.0.1", "mustache": "^4.2.0" } }, "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA=="], "i18n": ["i18n@0.15.1", "", { "dependencies": { "@messageformat/core": "^3.0.0", "debug": "^4.3.3", "fast-printf": "^1.6.9", "make-plural": "^7.0.0", "math-interval-parser": "^2.0.1", "mustache": "^4.2.0" } }, "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA=="],
@ -3538,6 +3535,8 @@
"fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], "fast-glob/glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
"fdir/picomatch": ["picomatch@4.0.2", "", {}, "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg=="],
"federation/apollo-server-testing": ["apollo-server-testing@2.25.2", "", { "dependencies": { "apollo-server-core": "^2.25.2" }, "peerDependencies": { "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, "sha512-HjQV9wPbi/ZqpRbyyhNwCbaDnfjDM0hTRec5TOoOjurEZ/vh4hTPHwGkDZx3kbcWowhGxe2qoHM6KANSB/SxuA=="], "federation/apollo-server-testing": ["apollo-server-testing@2.25.2", "", { "dependencies": { "apollo-server-core": "^2.25.2" }, "peerDependencies": { "graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" } }, "sha512-HjQV9wPbi/ZqpRbyyhNwCbaDnfjDM0hTRec5TOoOjurEZ/vh4hTPHwGkDZx3kbcWowhGxe2qoHM6KANSB/SxuA=="],
"federation/helmet": ["helmet@7.2.0", "", {}, "sha512-ZRiwvN089JfMXokizgqEPXsl2Guk094yExfoDXR0cBYWxtBbaSww/w+vT4WEJsBW2iTUi1GgZ6swmoug3Oy4Xw=="], "federation/helmet": ["helmet@7.2.0", "", {}, "sha512-ZRiwvN089JfMXokizgqEPXsl2Guk094yExfoDXR0cBYWxtBbaSww/w+vT4WEJsBW2iTUi1GgZ6swmoug3Oy4Xw=="],

View File

@ -1,43 +1,5 @@
services: services:
########################################################
# Gradido ##############################################
########################################################
gradido:
image: gradido/gradido:local-development
build:
context: ./
dockerfile: ./Dockerfile
target: development
args:
BUILD_COMMIT: ${BUILD_COMMIT}
BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT}
BUILD_VERSION: ${BUILD_VERSION}
depends_on:
- mariadb
networks:
- internal-net
- external-net
ports:
- ${BACKEND_PORT:-4000}:${BACKEND_PORT:-4000}
- ${FEDERATION_PORT:-5010}:${FEDERATION_PORT:-5010}
- ${FRONTEND_MODULE_PORT:-3000}:${FRONTEND_MODULE_PORT:-3000}
- ${ADMIN_MODULE_PORT:-8080}:${ADMIN_MODULE_PORT:-8080}
environment:
# Envs used in Dockerfile
# - DOCKER_WORKDIR="/app"
# - PORT=4000
- BUILD_DATE
- BUILD_VERSION
- BUILD_COMMIT
- NODE_ENV=production
- DB_HOST=mariadb
volumes:
- ./logs/backend:/logs/backend
- gradido_node_modules:/app/node_modules
- .:/app
######################################################## ########################################################
# FRONTEND ############################################# # FRONTEND #############################################
######################################################## ########################################################
@ -52,9 +14,10 @@ services:
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- frontend_node_modules:/app/node_modules - node_modules:/app/node_modules
- turbo_cache:/tmp/turbo
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./frontend:/app - .:/app
######################################################## ########################################################
# ADMIN INTERFACE ###################################### # ADMIN INTERFACE ######################################
@ -70,9 +33,10 @@ services:
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- admin_node_modules:/app/node_modules - node_modules:/app/node_modules
- turbo_cache:/tmp/turbo
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./admin:/app - .:/app
######################################################## ########################################################
# BACKEND ############################################## # BACKEND ##############################################
@ -86,19 +50,14 @@ services:
- external-net - external-net
- internal-net - internal-net
environment: environment:
- NODE_ENV="development" - NODE_ENV=development
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- backend_node_modules:/app/node_modules - node_modules:/app/node_modules
- backend_database_node_modules:/database/node_modules - turbo_cache:/tmp/turbo
- backend_database_build:/database/build
- backend_config_node_modules:/config/node_modules
- backend_config_build:/config/build
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./backend:/app - .:/app
- ./database:/database
- ./config:/config
######################################################## ########################################################
# DHT-NODE ############################################# # DHT-NODE #############################################
@ -116,15 +75,10 @@ services:
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- dht_node_modules:/app/node_modules - node_modules:/app/node_modules
- dht_database_node_modules:/database/node_modules - turbo_cache:/tmp/turbo
- dht_database_build:/database/build
- dht_config_node_modules:/config/node_modules
- dht_config_build:/config/build
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./dht-node:/app - .:/app
- ./database:/database
- ./config:/config
######################################################## ########################################################
# DLT-CONNECTOR ######################################## # DLT-CONNECTOR ########################################
@ -163,15 +117,10 @@ services:
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- federation_node_modules:/app/node_modules - node_modules:/app/node_modules
- federation_database_node_modules:/database/node_modules - turbo_cache:/tmp/turbo
- federation_database_build:/database/build
- federation_config_node_modules:/config/node_modules
- federation_config_build:/config/build
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./federation:/app - .:/app
- ./database:/database
- ./config:/config
######################################################## ########################################################
# DATABASE ############################################## # DATABASE ##############################################
@ -190,7 +139,8 @@ services:
volumes: volumes:
# This makes sure the docker container has its own node modules. # This makes sure the docker container has its own node modules.
# Therefore it is possible to have a different node version on the host machine # Therefore it is possible to have a different node version on the host machine
- database_node_modules:/app/node_modules - node_modules:/app/node_modules
- turbo_cache:/tmp/turbo
# bind the local folder to the docker to allow live reload # bind the local folder to the docker to allow live reload
- ./database:/app - ./database:/app
@ -261,25 +211,8 @@ services:
- external-net - external-net
volumes: volumes:
admin_node_modules: node_modules:
frontend_node_modules:
gradido_node_modules:
backend_node_modules:
backend_database_node_modules:
backend_database_build:
backend_config_node_modules:
backend_config_build:
dht_node_modules:
dht_database_node_modules:
dht_database_build:
dht_config_node_modules:
dht_config_build:
dlt_connector_modules: dlt_connector_modules:
federation_node_modules:
federation_database_node_modules:
federation_database_build:
federation_config_node_modules:
federation_config_build:
database_node_modules:
dlt-database_node_modules: dlt-database_node_modules:
dlt-database_build: dlt-database_build:
turbo_cache:

View File

@ -5,47 +5,14 @@
services: services:
########################################################
# Gradido ##############################################
########################################################
gradido:
image: gradido/gradido:local-production
build:
context: ./
dockerfile: ./Dockerfile
target: production
args:
BUILD_COMMIT: ${BUILD_COMMIT}
BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT}
BUILD_VERSION: ${BUILD_VERSION}
depends_on:
- mariadb
networks:
- internal-net
- external-net
ports:
- ${BACKEND_PORT:-4000}:${BACKEND_PORT:-4000}
- ${FEDERATION_PORT:-5010}:${FEDERATION_PORT:-5010}
- ${FRONTEND_MODULE_PORT:-3000}:${FRONTEND_MODULE_PORT:-3000}
- ${ADMIN_MODULE_PORT:-8080}:${ADMIN_MODULE_PORT:-8080}
environment:
# Envs used in Dockerfile
# - DOCKER_WORKDIR="/app"
# - PORT=4000
- BUILD_DATE
- BUILD_VERSION
- BUILD_COMMIT
- NODE_ENV=production
- DB_HOST=mariadb
volumes:
- ./logs:/logs
######################################################## ########################################################
# FRONTEND ############################################# # FRONTEND #############################################
######################################################## ########################################################
frontend: frontend:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/frontend:local-production image: gradido/frontend:local-production
env_file:
- .env.git
build: build:
context: ./ context: ./
dockerfile: ./frontend/Dockerfile dockerfile: ./frontend/Dockerfile
@ -54,13 +21,11 @@ services:
BUILD_COMMIT: ${BUILD_COMMIT} BUILD_COMMIT: ${BUILD_COMMIT}
BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT} BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT}
BUILD_VERSION: ${BUILD_VERSION} BUILD_VERSION: ${BUILD_VERSION}
profiles:
- single
networks: networks:
- external-net - external-net
- internal-net - internal-net
ports: ports:
- 3000:3000 - 3000:${FRONTEND_MODULE_PORT:-3000}
environment: environment:
# Envs used in Dockerfile # Envs used in Dockerfile
# - DOCKER_WORKDIR="/app" # - DOCKER_WORKDIR="/app"
@ -87,14 +52,15 @@ services:
BUILD_COMMIT: ${BUILD_COMMIT} BUILD_COMMIT: ${BUILD_COMMIT}
BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT} BUILD_COMMIT_SHORT: ${BUILD_COMMIT_SHORT}
BUILD_VERSION: ${BUILD_VERSION} BUILD_VERSION: ${BUILD_VERSION}
profiles:
- single
networks: networks:
- external-net - external-net
- internal-net - internal-net
ports: ports:
- 8080:80 - 3000:${ADMIN_MODULE_PORT:-8080}
environment: environment:
- BUILD_COMMIT=${BUILD_COMMIT}
- BUILD_COMMIT_SHORT=${BUILD_COMMIT_SHORT}
- BUILD_VERSION=${BUILD_VERSION}
# Envs used in Dockerfile # Envs used in Dockerfile
# - DOCKER_WORKDIR="/app" # - DOCKER_WORKDIR="/app"
# - PORT=8090 # - PORT=8090
@ -127,18 +93,18 @@ services:
backend: backend:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/backend:local-production image: gradido/backend:local-production
env_file:
- .env.git
build: build:
# since we have to include the entities from ./database we cannot define the context as ./backend # since we have to include the entities from ./database we cannot define the context as ./backend
# this might blow build image size to the moon ?! # this might blow build image size to the moon ?!
context: ./ context: ./
dockerfile: ./backend/Dockerfile dockerfile: ./backend/Dockerfile
target: production target: production
profiles:
- single
networks: networks:
- internal-net - internal-net
ports: ports:
- 4000:4000 - 4000:${BACKEND_PORT:-4000}
depends_on: depends_on:
- mariadb - mariadb
environment: environment:
@ -163,14 +129,14 @@ services:
dht-node: dht-node:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/dht-node:local-production image: gradido/dht-node:local-production
env_file:
- .env.git
build: build:
# since we have to include the entities from ./database we cannot define the context as ./backend # since we have to include the entities from ./database we cannot define the context as ./backend
# this might blow build image size to the moon ?! # this might blow build image size to the moon ?!
context: ./ context: ./
dockerfile: ./dht-node/Dockerfile dockerfile: ./dht-node/Dockerfile
target: production target: production
profiles:
- single
networks: networks:
- internal-net - internal-net
- external-net - external-net
@ -206,8 +172,6 @@ services:
context: . context: .
dockerfile: ./dlt-connector/Dockerfile dockerfile: ./dlt-connector/Dockerfile
target: production target: production
profiles:
- dlt
networks: networks:
- internal-net - internal-net
- external-net - external-net
@ -233,25 +197,24 @@ services:
federation: federation:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/federation:local-production image: gradido/federation:local-production
env_file:
- .env.git
build: build:
# since we have to include the entities from ./database we cannot define the context as ./federation # since we have to include the entities from ./database we cannot define the context as ./federation
# this might blow build image size to the moon ?! # this might blow build image size to the moon ?!
context: ./ context: ./
dockerfile: ./federation/Dockerfile dockerfile: ./federation/Dockerfile
target: production target: production
profiles:
- single
networks: networks:
- internal-net - internal-net
- external-net - external-net
ports: ports:
- 5010:5010 - 5010:${FEDERATION_PORT:-5010}
depends_on: depends_on:
- mariadb - mariadb
environment: environment:
# Envs used in Dockerfile # Envs used in Dockerfile
# - DOCKER_WORKDIR="/app" # - DOCKER_WORKDIR="/app"
- PORT=5010
- BUILD_DATE - BUILD_DATE
- BUILD_VERSION - BUILD_VERSION
- BUILD_COMMIT - BUILD_COMMIT
@ -270,12 +233,12 @@ services:
database: database:
# name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there
image: gradido/database:local-up image: gradido/database:local-up
env_file:
- .env.git
build: build:
context: . context: .
dockerfile: ./database/Dockerfile dockerfile: ./database/Dockerfile
target: up target: up
profiles:
- database
depends_on: depends_on:
- mariadb - mariadb
networks: networks:
@ -331,7 +294,9 @@ services:
- external-net - external-net
- internal-net - internal-net
depends_on: depends_on:
- gradido - backend
- frontend
- admin
ports: ports:
- 80:80 - 80:80
volumes: volumes:

View File

@ -1,3 +1,8 @@
FROM nginx:1.21.0 FROM nginx:1.21.0-alpine
COPY ./gradido.conf /etc/nginx/conf.d/default.conf
COPY ./gradido.conf /etc/nginx/conf.d/default.conf

View File

@ -13,7 +13,7 @@ server {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_pass http://gradido:3000; proxy_pass http://frontend:3000;
proxy_redirect off; proxy_redirect off;
} }
@ -26,7 +26,7 @@ server {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_pass http://gradido:4000; proxy_pass http://backend:4000;
proxy_redirect off; proxy_redirect off;
} }
@ -39,7 +39,7 @@ server {
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_pass http://gradido:4000/hook; proxy_pass http://backend:4000/hook;
proxy_redirect off; proxy_redirect off;
} }
@ -53,7 +53,7 @@ server {
proxy_set_header Host $host; proxy_set_header Host $host;
# TODO: in docker environemnt we do not have the trailing slash. This needs work # TODO: in docker environemnt we do not have the trailing slash. This needs work
proxy_pass http://gradido:8080; proxy_pass http://admin:8080;
proxy_redirect off; proxy_redirect off;
} }

View File

@ -23,8 +23,7 @@
"docker": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml up", "docker": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml up",
"docker:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml build", "docker:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose -f docker-compose.yml build",
"docker_dev": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose up", "docker_dev": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose up",
"docker_dev:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose build", "docker_dev:rebuild": "cross-env BUILD_COMMIT=$(git rev-parse HEAD) docker compose build"
"prepare": "husky"
}, },
"dependencies": { "dependencies": {
"auto-changelog": "^2.4.0", "auto-changelog": "^2.4.0",
@ -33,8 +32,7 @@
"cross-env": "^7.0.3" "cross-env": "^7.0.3"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.4", "@biomejs/biome": "1.9.4"
"husky": "^9.1.7"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"

View File

@ -6858,11 +6858,6 @@ humanize-ms@^1.2.1:
dependencies: dependencies:
ms "^2.0.0" ms "^2.0.0"
husky@^9.1.7:
version "9.1.7"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
hypercore-crypto@^3.3.0, hypercore-crypto@^3.3.1: hypercore-crypto@^3.3.0, hypercore-crypto@^3.3.1:
version "3.6.0" version "3.6.0"
resolved "https://registry.yarnpkg.com/hypercore-crypto/-/hypercore-crypto-3.6.0.tgz#6986cc4038339c4402282bbdf33a4fe2dea98db7" resolved "https://registry.yarnpkg.com/hypercore-crypto/-/hypercore-crypto-3.6.0.tgz#6986cc4038339c4402282bbdf33a4fe2dea98db7"