+20
-3
Dockerfile
+20
-3
Dockerfile
···
35
35
WORKDIR /prod/web
36
36
EXPOSE 8002
37
37
CMD ["node", "dist/index.js"]
38
+
LABEL org.opencontainers.image.authors="Dane Miller 'me@dane.computer'" \
39
+
org.opencontainers.image.source="https://tangled.org/dane.is.extraordinarily.cool/tealfmbot" \
40
+
org.opencontainers.image.title="discostuweb" \
41
+
org.opencontainers.image.description="The web service for authentication for the disco stu discord bot" \
42
+
org.opencontainers.image.version=$VERSION \
43
+
org.opencontainers.image.created=$BUILD_DATE \
44
+
org.opencontainers.image.revision=$SHA \
45
+
org.opencontainers.image.licenses="MIT"
46
+
38
47
39
48
FROM base AS bot
40
49
COPY --from=build --chown=1000:1000 /prod/bot /prod/bot
41
50
WORKDIR /prod/bot
42
51
CMD ["node", "dist/main.js"]
52
+
LABEL org.opencontainers.image.authors="Dane Miller 'me@dane.computer'" \
53
+
org.opencontainers.image.source="https://tangled.org/dane.is.extraordinarily.cool/tealfmbot" \
54
+
org.opencontainers.image.title="discostubot" \
55
+
org.opencontainers.image.description="A discord bot that displays your music listens based on your teal.fm records" \
56
+
org.opencontainers.image.version=$VERSION \
57
+
org.opencontainers.image.created=$BUILD_DATE \
58
+
org.opencontainers.image.revision=$SHA \
59
+
org.opencontainers.image.licenses="MIT"
60
+
43
61
44
62
FROM base AS tapper
45
63
COPY --from=build --chown=1000:1000 /prod/tapper /prod/tapper
46
64
WORKDIR /prod/tapper
47
65
CMD ["node", "dist/index.js"]
48
-
49
66
LABEL org.opencontainers.image.authors="Dane Miller 'me@dane.computer'" \
50
67
org.opencontainers.image.source="https://tangled.org/dane.is.extraordinarily.cool/tealfmbot" \
51
-
org.opencontainers.image.title="discostu" \
52
-
org.opencontainers.image.description="A discord bot that displays your music listens based on your teal.fm records" \
68
+
org.opencontainers.image.title="discostutap" \
69
+
org.opencontainers.image.description="The backfill and firehose listener for teal.fm records" \
53
70
org.opencontainers.image.version=$VERSION \
54
71
org.opencontainers.image.created=$BUILD_DATE \
55
72
org.opencontainers.image.revision=$SHA \
+26
build-and-publish-images.sh
+26
build-and-publish-images.sh
···
1
+
SHA=$(git rev-parse HEAD)
2
+
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
3
+
VERSION=$(git describe --tags --abbrev=0)
4
+
REGISTRY=atcr.io/dane.is.extraordinarily.cool
5
+
6
+
services=(
7
+
web
8
+
bot
9
+
tapper
10
+
)
11
+
12
+
echo "building container versions: ${VERSION#v}"
13
+
14
+
for svc in ${services[@]}; do
15
+
podman build \
16
+
-t $REGISTRY/discostu$svc:${VERSION#v} \
17
+
--target $svc \
18
+
--build-arg VERSION=${VERSION#v} \
19
+
--build-arg SHA=$SHA \
20
+
--build-arg BUILD_DATE=$BUILD_DATE \
21
+
--pull \
22
+
--no-cache \
23
+
-f Dockerfile .
24
+
25
+
podman push $REGISTRY/discostu$svc:${VERSION#v}
26
+
done
-15
build-docker.sh
-15
build-docker.sh
···
1
-
SHA=$(git rev-parse HEAD)
2
-
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
3
-
VERSION=$(git describe --tags --abbrev=0)
4
-
5
-
echo "building container version ${VERSION#v}"
6
-
7
-
docker build \
8
-
-t atcr.io/dane.is.extraordinarily.cool/discostu:${VERSION#v} \
9
-
--build-arg VERSION=${VERSION#v} \
10
-
--build-arg SHA=$SHA \
11
-
--build-arg BUILD_DATE=$BUILD_DATE \
12
-
--pull \
13
-
--no-cache .
14
-
15
-
# docker push atcr.io/dane.is.extraordinarily.cool/discostu:${VERSION#v}