mirror of
https://github.com/IT4Change/gradido.git
synced 2026-04-06 01:25:28 +00:00
Merge branch 'master' into frontend_increase_memo
This commit is contained in:
commit
040096fa35
2
.github/workflows/test_database.yml
vendored
2
.github/workflows/test_database.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Database | Build image
|
- name: Database | Build image
|
||||||
run: docker build --target build -t "gradido/database:build" -f database/Dockerfile .
|
run: docker build --target up -t "gradido/database:up" -f database/Dockerfile .
|
||||||
|
|
||||||
database_migration_test:
|
database_migration_test:
|
||||||
if: needs.files-changed.outputs.database == 'true' || needs.files-changed.outputs.docker-compose == 'true' || needs.files-changed.outputs.mariadb == 'true' || needs.files-changed.outputs.shared == 'true'
|
if: needs.files-changed.outputs.database == 'true' || needs.files-changed.outputs.docker-compose == 'true' || needs.files-changed.outputs.mariadb == 'true' || needs.files-changed.outputs.shared == 'true'
|
||||||
|
|||||||
@ -56,27 +56,32 @@ ENV PATH="/root/.bun/bin:${PATH}"
|
|||||||
FROM bun-base as installer
|
FROM bun-base as installer
|
||||||
|
|
||||||
COPY --chown=app:app . .
|
COPY --chown=app:app . .
|
||||||
RUN bun install --filter database --production --no-cache --frozen-lockfile
|
|
||||||
|
##################################################################################
|
||||||
|
# Build Shared ###################################################################
|
||||||
|
##################################################################################
|
||||||
|
FROM installer as build-shared
|
||||||
|
|
||||||
|
RUN bun install --filter shared --no-cache --frozen-lockfile \
|
||||||
|
&& cd shared && yarn typecheck && yarn build
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# Build ##########################################################################
|
# Build ##########################################################################
|
||||||
##################################################################################
|
##################################################################################
|
||||||
FROM installer as build
|
FROM installer as build
|
||||||
|
|
||||||
RUN bun install --no-cache --frozen-lockfile \
|
RUN bun install --filter database --production --no-cache --frozen-lockfile
|
||||||
&& cd shared && yarn build \
|
|
||||||
&& cd ../database && yarn build && yarn typecheck
|
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# PRODUCTION IMAGE ###############################################################
|
# PRODUCTION IMAGE ###############################################################
|
||||||
##################################################################################
|
##################################################################################
|
||||||
FROM base as production
|
FROM base as production
|
||||||
|
|
||||||
COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/src ./src
|
COPY --chown=app:app --from=build-shared ${DOCKER_WORKDIR}/shared/build ./shared/build
|
||||||
COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/migration ./migration
|
COPY --chown=app:app --from=build-shared ${DOCKER_WORKDIR}/shared/package.json ./shared/package.json
|
||||||
COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/node_modules ./node_modules
|
COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/database ./database
|
||||||
COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/package.json ./package.json
|
COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/node_modules ./node_modules
|
||||||
COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig.json
|
COPY --chown=app:app --from=build ${DOCKER_WORKDIR}/package.json ./package.json
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# TEST UP ########################################################################
|
# TEST UP ########################################################################
|
||||||
@ -84,7 +89,7 @@ COPY --chown=app:app --from=installer ${DOCKER_WORKDIR}/tsconfig.json ./tsconfig
|
|||||||
FROM production as up
|
FROM production as up
|
||||||
|
|
||||||
# Run command
|
# Run command
|
||||||
CMD /bin/sh -c "yarn up"
|
CMD /bin/sh -c "cd database && yarn up"
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# TEST RESET #####################################################################
|
# TEST RESET #####################################################################
|
||||||
@ -92,7 +97,7 @@ CMD /bin/sh -c "yarn up"
|
|||||||
FROM production as reset
|
FROM production as reset
|
||||||
|
|
||||||
# Run command
|
# Run command
|
||||||
CMD /bin/sh -c "yarn reset"
|
CMD /bin/sh -c "cd database && yarn reset"
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
# TEST DOWN ######################################################################
|
# TEST DOWN ######################################################################
|
||||||
@ -100,4 +105,4 @@ CMD /bin/sh -c "yarn reset"
|
|||||||
FROM production as down
|
FROM production as down
|
||||||
|
|
||||||
# Run command
|
# Run command
|
||||||
CMD /bin/sh -c "yarn down"
|
CMD /bin/sh -c "cd database && yarn down"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user