Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/codeanalysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ jobs:
- name: Install dependencies
run: npm install

- name: Generate Protobufs
run: |
sudo apt install -y protobuf-compiler
git submodule init
git submodule update

- name: Build site
run: npm run build

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tts-protobufs"]
path = tts-protobufs
url = https://github.com/NIAEFEUP/tts-protobufs.git
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ FROM node:21-alpine3.19 AS build
RUN mkdir -p /usr/src/tts-fe
WORKDIR /usr/src/tts-fe

# Install protobuf compiler
RUN apk update
RUN apk add --no-cache protoc git

COPY .*rc ./
COPY *.json ./
COPY .prettier* ./
Expand All @@ -18,6 +22,12 @@ COPY public/ public/
COPY src/ src/
COPY index.html ./

RUN git init
RUN git submodule init
RUN git submodule update

COPY ./tts-protobufs/ ./tts-protobufs

# dev
FROM build AS dev

Expand All @@ -39,11 +49,13 @@ RUN echo "${TTS_FE_VARS_CONTENT}" | base64 -d > .env.production

# prod-build
FROM prod-build-with-${TTS_FE_VARS_METHOD} AS prod-build

COPY --from=build /usr/src/tts-fe/tts-protobufs ./tts-protobufs

RUN npm run build

# prod
FROM nginx:alpine AS prod

COPY --from=prod-build /usr/src/tts-fe/build /usr/share/nginx/html
COPY nginx.tts.conf /etc/nginx/conf.d/default.conf

Loading
Loading