Added mode automated docker builds
This commit is contained in:
parent
b05897f0b5
commit
b45268b2c5
|
@ -17,7 +17,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||||
RUN yarn build && yarn install
|
RUN yarn build && yarn install
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
# Production image, copy all the files and run next
|
||||||
FROM node:16.13.1 AS runner
|
FROM node:alpine AS runner
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
|
1
build_number
Normal file
1
build_number
Normal file
|
@ -0,0 +1 @@
|
||||||
|
2
|
10
docker.sh
Executable file
10
docker.sh
Executable 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
|
Loading…
Reference in a new issue