Update fickit
[fic/server.git] / Dockerfile-admin
1 FROM golang:alpine as gobuild
2
3 RUN apk add --no-cache git
4
5 WORKDIR /go/src/srs.epita.fr/fic-server/admin
6
7 ADD settings ../settings/
8 ADD libfic ../libfic/
9 ADD admin/api ./api/
10 ADD admin/pki ./pki/
11 ADD admin/sync ./sync/
12 ADD admin/*.go ./
13
14 RUN go get -d -v
15 RUN go build -v
16
17
18 FROM alpine
19
20 RUN apk add --no-cache openssl ca-certificates
21
22 EXPOSE 8081
23
24 WORKDIR /srv
25
26 ENTRYPOINT ["/srv/admin", "-bind=:8081", "-baseurl=/admin/"]
27
28 COPY --from=gobuild /go/src/srs.epita.fr/fic-server/admin/admin /srv/admin
29 COPY admin/static/check_import.html /srv/htdocs-admin/
30 COPY admin/static/css/bootstrap.min.css frontend/static/css/glyphicon.css /srv/htdocs-admin/css/
31 COPY frontend/static/fonts /srv/htdocs-admin/fonts
32 COPY admin/static/img /srv/htdocs-admin/img
33 COPY admin/static/views /srv/htdocs-admin/views
34 COPY admin/static/js/app.js frontend/static/js/angular.min.js admin/static/js/angular-resource.min.js frontend/static/js/angular-route.min.js frontend/static/js/angular-sanitize.min.js frontend/static/js/bootstrap.min.js frontend/static/js/common.js frontend/static/js/d3.v3.min.js frontend/static/js/i18n frontend/static/js/jquery.min.js /srv/htdocs-admin/js/