Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetaGerMaps
Frontend
Commits
f9cb756a
Commit
f9cb756a
authored
1 year ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
building app images
parent
6bc5b1c2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+33
-0
33 additions, 0 deletions
.gitlab-ci.yml
with
33 additions
and
0 deletions
.gitlab-ci.yml
+
33
−
0
View file @
f9cb756a
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment