Added mode automated docker builds

This commit is contained in:
Ludoviko 2022-01-01 23:18:50 +00:00
parent b05897f0b5
commit b45268b2c5
No known key found for this signature in database
GPG key ID: 1E66DEA3F5D623D1
3 changed files with 12 additions and 1 deletions

View file

@ -17,7 +17,7 @@ COPY --from=deps /app/node_modules ./node_modules
RUN yarn build && yarn install
# Production image, copy all the files and run next
FROM node:16.13.1 AS runner
FROM node:alpine AS runner
WORKDIR /app
ENV NODE_ENV production

1
build_number Normal file
View file

@ -0,0 +1 @@
2

10
docker.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
m=$(cat ./build_number)
echo $m
wait 10
docker build -t ghcr.io/lucxjo/friends-best:build-$m .
docker build -t ghcr.io/lucxjo/friends-best:latest .
docker push ghcr.io/lucxjo/friends-best:build-$m
docker push ghcr.io/lucxjo/friends-best:latest
echo $((m+1)) > ./build_number