-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.dev
40 lines (31 loc) · 1.51 KB
/
Dockerfile.dev
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
FROM --platform=linux/amd64 golang:1.21-alpine
ARG SPOTIFY_SLACK_APP_SLACK_CLIENT_ID
ARG SPOTIFY_SLACK_APP_SLACK_CLIENT_SECRET
ARG SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_ID
ARG SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_SECRET
ARG SPOTIFY_SLACK_APP_SPOTIFY_REDIRECT_URL
ARG SPOTIFY_SLACK_APP_NEW_RELIC_APP_NAME
ARG SPOTIFY_SLACK_APP_NEW_RELIC_LICENSE
ARG SPOTIFY_SLACK_APP_DATABASE_URL
ARG SPOTIFY_SLACK_APP_SLACK_AUTH_URL
ARG SPOTIFY_SLACK_APP_CRYPTO_KEY
ARG SPOTIFY_SLACK_APP_SIGNING_SECRET
ENV SPOTIFY_SLACK_APP_SLACK_CLIENT_ID ${SPOTIFY_SLACK_APP_SLACK_CLIENT_ID}
ENV SPOTIFY_SLACK_APP_SLACK_CLIENT_SECRET ${SPOTIFY_SLACK_APP_SLACK_CLIENT_SECRET}
ENV SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_ID ${SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_ID}
ENV SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_SECRET ${SPOTIFY_SLACK_APP_SPOTIFY_CLIENT_SECRET}
ENV SPOTIFY_SLACK_APP_SPOTIFY_REDIRECT_URL ${SPOTIFY_SLACK_APP_SPOTIFY_REDIRECT_URL}
ENV SPOTIFY_SLACK_APP_NEW_RELIC_APP_NAME ${SPOTIFY_SLACK_APP_NEW_RELIC_APP_NAME}
ENV SPOTIFY_SLACK_APP_NEW_RELIC_LICENSE ${SPOTIFY_SLACK_APP_NEW_RELIC_LICENSE}
ENV SPOTIFY_SLACK_APP_DATABASE_URL ${SPOTIFY_SLACK_APP_DATABASE_URL}
ENV SPOTIFY_SLACK_APP_SLACK_AUTH_URL ${SPOTIFY_SLACK_APP_SLACK_AUTH_URL}
ENV SPOTIFY_SLACK_APP_CRYPTO_KEY ${SPOTIFY_SLACK_APP_CRYPTO_KEY}
ENV SPOTIFY_SLACK_APP_SIGNING_SECRET ${SPOTIFY_SLACK_APP_SIGNING_SECRET}
ENV PORT 8080
ADD . /app
WORKDIR /app
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/spotify-status ./src
RUN chmod +x ./bin/spotify-status
EXPOSE $PORT
CMD ["./bin/spotify-status"]