Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-05-17 18:00:40 +02:00
parent 75e0a0192d
commit 88f49952e3
5 changed files with 8 additions and 2 deletions

View File

@ -22,7 +22,6 @@ jobs:
mkdir ${{ secrets.PATH }}
cd ${{ secrets.PATH }}
git clone -b prod https://github.com/${{ github.repository }} .
cp .env ./astro/.env
sed -i "s/ASTRO_URL=.*/ASTRO_URL=${{ vars.ASTRO_URL }}/" .env
sed -i "s/PAYLOAD_URL=.*/PAYLOAD_URL=${{ vars.PAYLOAD_URL }}/" .env
sed -i "s/PAYLOAD_PORT=.*/PAYLOAD_PORT=${{ secrets.PAYLOAD_PORT }}/" .env
@ -31,5 +30,6 @@ jobs:
sed -i "s/MONGODB_USER=.*/MONGODB_USER=${{ secrets.MONGODB_USER }}/" .env
sed -i "s/MONGODB_PW=.*/MONGODB_PW=${{ secrets.MONGODB_PW }}/" .env
sed -i "s/NAME=.*/NAME=${{ vars.NAME }}/" .env
cp .env ./astro/.env
fi
yarn prod

View File

@ -13,6 +13,7 @@ FROM base AS build
ENV NODE_ENV=production
WORKDIR /build
COPY --from=base /base ./
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
RUN yarn build
FROM nginx:stable AS prod

View File

@ -41,6 +41,8 @@ services:
- traefik.http.routers.${NAME}-payload.entrypoints=https
- traefik.http.routers.${NAME}-payload.tls.certresolver=httpresolver
- traefik.docker.network=traefik_network
networks:
- traefik_network
networks:
traefik_network:

View File

@ -23,5 +23,5 @@ COPY package*.json .
RUN yarn install --production
COPY --from=build /build/dist ./dist
COPY --from=build /build/build ./build
EXPOSE 3001
EXPOSE 3000
CMD ["yarn", "serve"]

View File

@ -8,7 +8,10 @@ const Posts: CollectionConfig = {
},
access: {
read: () => true,
create: () => true,
update: () => true,
},
fields: [
{
name: "title",