Skip to content

Commit

Permalink
- add static files for prod build
Browse files Browse the repository at this point in the history
  • Loading branch information
ubaid4j committed Feb 29, 2024
1 parent 5ae99a4 commit cdbdee0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api-gateway/k8s/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
spec:
containers:
- name: api-gateway
image: ghcr.io/ubaid4j/cloud-native-app-spring-boot/api-gateway:0.0.3-SNAPSHOT
image: ghcr.io/ubaid4j/cloud-native-app-spring-boot/api-gateway:0.0.3-snapshot
imagePullPolicy: IfNotPresent
env:
- name: SPRING_PROFILES_ACTIVE
Expand All @@ -37,5 +37,4 @@ spec:
volumes:
- name: api-gateway-config-volume
configMap:
name: api-gateway-config

name: api-gateway-config
52 changes: 52 additions & 0 deletions api-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

<properties>
<java.version>21</java.version>
<node.version>v21.1.0</node.version>
<npm.version>10.2.0</npm.version>
<spring-cloud.version>2023.0.0</spring-cloud.version>
</properties>

Expand Down Expand Up @@ -67,13 +69,63 @@
</image>
</configuration>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<executions>
<execution>
<id>install-node-and-npm</id>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
</configuration>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>webapp build test</id>
<goals>
<goal>npm</goal>
</goals>
<phase>test</phase>
<configuration>
<arguments>run webapp:test</arguments>
<npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
</configuration>
</execution>
<execution>
<id>webapp build prod</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>run build</arguments>
<environmentVariables>
<APP_VERSION>${project.version}</APP_VERSION>
</environmentVariables>
<npmInheritsProxyConfigFromMaven>false</npmInheritsProxyConfigFromMaven>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit cdbdee0

Please sign in to comment.