Skip to content

Commit

Permalink
Merge pull request #18 from mooxl/dev
Browse files Browse the repository at this point in the history
heya
  • Loading branch information
mooxl committed May 17, 2023
2 parents fb98219 + 88f4995 commit 4d8200f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
1 change: 1 addition & 0 deletions astro/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion payload/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
3 changes: 3 additions & 0 deletions payload/src/collections/Posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const Posts: CollectionConfig = {
},
access: {
read: () => true,
create: () => true,
update: () => true,
},

fields: [
{
name: "title",
Expand Down

0 comments on commit 4d8200f

Please sign in to comment.