Skip to content
Snippets Groups Projects
Commit f9cb756a authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

building app images

parent 6bc5b1c2
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ workflow:
stages:
- assets
- build
build_asset_images:
image: $BUILD_DOCKER_IMAGE
......@@ -30,6 +31,7 @@ build_asset_images:
- docker logout $CI_REGISTRY
- source .env
- echo "COMPOSER_VERSION=$COMPOSER_VERSION" > .composerversion.env
- echo "NODE_TAG=$NODE_TAG" >> .composerversion.env
artifacts:
reports:
dotenv: .composerversion.env
......@@ -53,6 +55,37 @@ composer_install:
cache:
paths:
- app/.composer
npm_install:
image: $IMAGE_NAME/node:$NODE_TAG # Node Tag variable was defined in build artifact dotenv from previous job
stage: assets
script:
- cd app
- npm install --cache .npm --prefer-offline --no-audit
- npm run prod
needs:
- build_asset_images
artifacts:
paths:
- app/public
expire_in: 2 hrs
cache:
paths:
- app/.npm
build_images:
image: $BUILD_DOCKER_IMAGE
stage: build
needs:
- npm_install
- composer_install
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker compose build nginx fpm
- docker compose push nginx fpm
after_script:
- docker logout $CI_REGISTRY
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment