-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (32 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
46 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM dart:stable AS build
WORKDIR /server
COPY trivyal_server .
RUN dart pub get
RUN dart compile exe bin/main.dart -o bin/server
WORKDIR /web
COPY trivyal_flutter/ .
COPY trivyal_client/ ../trivyal_client/
RUN apt-get update && apt-get -y install curl git unzip xz-utils zip libglu1-mesa
RUN git clone https://github.com/flutter/flutter.git /usr/local/flutter
ENV PATH="${PATH}:/usr/local/flutter/bin"
ARG UTILS_SECRETS_DART
RUN echo $UTILS_SECRETS_DART | base64 -d > ./lib/utils/secrets.dart
RUN flutter pub get
RUN flutter build web
FROM alpine:latest
ENV runmode=production
ENV serverid=default
ENV logging=normal
ENV role=monolith
COPY --from=build /runtime/ /
COPY --from=build /server/bin/server server
COPY --from=build /server/confi[g]/ config/
COPY --from=build /server/we[b]/ web/
COPY --from=build /server/migration[s]/ migrations/
COPY --from=build /web/build/web/ web/
EXPOSE 8080
EXPOSE 8081
EXPOSE 8082
ARG CONFIG_GOOGLE_CLIENT_SECRET
RUN echo $CONFIG_GOOGLE_CLIENT_SECRET | base64 -d > ./config/google_client_secret.json
ENTRYPOINT ./server --mode=$runmode --server-id=$serverid --logging=$logging --role=$role --apply-migrations