From 88f49952e3d8e55ae3c97cc98c3fc6acba6c642b Mon Sep 17 00:00:00 2001 From: Max Schmidt Date: Wed, 17 May 2023 18:00:40 +0200 Subject: [PATCH] heya Signed-off-by: Max Schmidt --- .github/workflows/push.yml | 2 +- astro/Dockerfile | 1 + docker-compose-prod.yml | 2 ++ payload/Dockerfile | 2 +- payload/src/collections/Posts.ts | 3 +++ 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 9bbad84..6268b70 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 diff --git a/astro/Dockerfile b/astro/Dockerfile index 13401d8..b076310 100644 --- a/astro/Dockerfile +++ b/astro/Dockerfile @@ -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 diff --git a/docker-compose-prod.yml b/docker-compose-prod.yml index b99b698..80fdcd1 100644 --- a/docker-compose-prod.yml +++ b/docker-compose-prod.yml @@ -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: diff --git a/payload/Dockerfile b/payload/Dockerfile index f7f1db7..bedb17f 100644 --- a/payload/Dockerfile +++ b/payload/Dockerfile @@ -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"] \ No newline at end of file diff --git a/payload/src/collections/Posts.ts b/payload/src/collections/Posts.ts index 835c5c9..dde63e7 100644 --- a/payload/src/collections/Posts.ts +++ b/payload/src/collections/Posts.ts @@ -8,7 +8,10 @@ const Posts: CollectionConfig = { }, access: { read: () => true, + create: () => true, + update: () => true, }, + fields: [ { name: "title",