-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
50 lines (46 loc) · 1.38 KB
/
Dockerfile
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
47
48
49
50
FROM golang:1.10-alpine as builder
RUN apk add --update make git
WORKDIR src/git.containerum.net/ch/user-manager
COPY . .
RUN VERSION=$(git describe --abbrev=0 --tags) make build-for-docker
FROM alpine:3.7 as alpine
RUN apk --no-cache add tzdata zip ca-certificates
WORKDIR /usr/share/zoneinfo
# -0 means no compression. Needed because go's
# tz loader doesn't handle compressed data.
RUN zip -r -0 /zoneinfo.zip .
FROM alpine:3.7
# app
COPY --from=builder /tmp/user-manager /
# migrations
COPY pkg/migrations /migrations
# timezone data
ENV ZONEINFO /zoneinfo.zip
COPY --from=alpine /zoneinfo.zip /
# tls certificates
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ENV GIN_MODE=debug \
DB="postgres" \
PG_LOGIN="usermanager" \
PG_PASSWORD="ae9Oodai3aid" \
PG_ADDR="postgres:5432" \
PG_DBNAME="usermanager" \
PG_NOSSL=true \
MIGRATIONS_PATH="migrations" \
MAIL="http" \
MAIL_URL="http://ch-mail-templater:7070/" \
RECAPTCHA="dummy" \
RECAPTCHA_KEY="recaptcha_key" \
OAUTH_CLIENTS="http" \
AUTH_URL="http://ch-auth:1111/" \
PERMISSIONS="http" \
PERMISSIONS_URL="http://permissions:4242" \
TELEGRAM=false \
TELEGRAM_BOT_ID="" \
TELEGRAM_BOT_TOKEN="" \
TELEGRAM_BOT_CHAT_ID="" \
PORT=":8111" \
USER_MANAGER="impl" \
EVENTS="http" \
EVENTS_URL="http://events-api:1667"
ENTRYPOINT ["/user-manager"]