Skip to content

Commit b1e1d63

Browse files
Front: Upload release instead of building
1 parent 2bb3a19 commit b1e1d63

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

Dockerfile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ ENV BRANCH=${BRANCH}
88
WORKDIR /app
99
RUN git clone https://github.com/aquality-automation/aquality-tracking-api.git
1010
RUN cd aquality-tracking-api && git fetch origin && git checkout ${BRANCH} || git checkout -b ${BRANCH} origin/${BRANCH}
11-
RUN git clone https://github.com/aquality-automation/aquality-tracking-ui.git
12-
RUN cd aquality-tracking-ui && git fetch origin && git checkout ${BRANCH} || git checkout -b ${BRANCH} origin/${BRANCH}
1311

12+
# Build backend
1413
FROM maven:3.5-jdk-8-alpine as build-back
1514
COPY --from=clone /app/aquality-tracking-api /app
1615
WORKDIR /app
@@ -20,13 +19,16 @@ ARG DB_PORT=3306
2019
ARG DB_PASS
2120
RUN mvn package -f pom.xml -P !run-migration -Ddb.username="$DB_USER" -Ddb.password="$DB_PASS" -Ddb.host="$DB_HOST" -Ddb.publicPort="$DB_PORT" -Ddb.port="$DB_PORT" -Ddb.publicHost="$DB_HOST"
2221

23-
FROM node:10-alpine as build-front
22+
# Download and unpack frontend
23+
FROM ubuntu:latest as build-front
2424
WORKDIR /app
25-
COPY --from=clone /app/aquality-tracking-ui /app
26-
RUN apk add --no-cache git
27-
RUN npm i
28-
RUN npm run build:prod
25+
RUN apt-get update && apt-get -y install curl && apt-get -y install wget
26+
RUN wget --version
27+
RUN curl -s https://api.github.com/repos/aquality-automation/aquality-tracking-ui/releases/latest | grep "browser_download_url.*zip" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
28+
RUN apt-get install unzip
29+
RUN unzip dist.zip
2930

31+
# Grab all results copy to tomcat and run migration for DB
3032
FROM maven:3.5-jdk-8-alpine as results
3133
WORKDIR /result/back
3234
COPY --from=build-back /app /result/back/

0 commit comments

Comments
 (0)