Update Astro and Payload dependencies
This commit is contained in:
parent
3a39f967ef
commit
36678d38b7
@ -29,8 +29,9 @@ Secrets:
|
||||
|
||||
Variables:
|
||||
|
||||
- ASTRO_URL: URL of the Frontend
|
||||
- PAYLOAD_URL: URL of the CMS
|
||||
- ASTRO_HOST: Hostdomain of the Frontend
|
||||
- PAYLOAD_HOST: Hostdomain of the CMS
|
||||
- PAYLOAD_SERVER_URL: URL of the CMS
|
||||
- NAME: Name of the Container and Project
|
||||
|
||||
Please remember to set these secrets and variables in your repository settings to ensure a successful deployment through Github Workflows.
|
||||
|
1
astro/.gitignore
vendored
1
astro/.gitignore
vendored
@ -6,6 +6,7 @@ dist/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
yarn.lock
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
|
@ -8,16 +8,16 @@
|
||||
"build": "astro build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/image": "^0.16.8",
|
||||
"@astrojs/prefetch": "^0.2.1",
|
||||
"@astrojs/sitemap": "^1.3.1",
|
||||
"@astrojs/tailwind": "3.1.2",
|
||||
"astro": "^2.4.5",
|
||||
"astro-compress": "^1.1.43",
|
||||
"astro-critters": "^1.1.34",
|
||||
"@astrojs/image": "^0.17.0",
|
||||
"@astrojs/prefetch": "^0.2.3",
|
||||
"@astrojs/sitemap": "^1.3.3",
|
||||
"@astrojs/tailwind": "3.1.3",
|
||||
"astro": "^2.6.1",
|
||||
"astro-compress": "^1.1.47",
|
||||
"astro-critters": "^1.1.38",
|
||||
"css-select": "5.1.0",
|
||||
"sharp": "^0.32.1",
|
||||
"slate-serializers": "0.0.32",
|
||||
"slate-serializers": "0.1.0",
|
||||
"tailwindcss": "^3.0.24"
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import type { Post } from "../types";
|
||||
|
||||
const url = import.meta.env.DEV
|
||||
? "http://payload:3001"
|
||||
: `https://${import.meta.env.PAYLOAD_URL}`;
|
||||
: `${import.meta.env.PAYLOAD_SERVER_URL}`;
|
||||
|
||||
export const getPosts = async () =>
|
||||
(await (await fetch(`${url}/api/posts`)).json()).docs as Post[];
|
||||
|
934
astro/yarn.lock
934
astro/yarn.lock
File diff suppressed because it is too large
Load Diff
@ -4,10 +4,10 @@ services:
|
||||
context: astro
|
||||
target: prod
|
||||
environment:
|
||||
PAYLOAD_URL: ${PAYLOAD_URL}
|
||||
PAYLOAD_SERVER_URL: ${PAYLOAD_SERVER_URL}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${NAME}-astro.rule=Host(`${ASTRO_URL}`)"
|
||||
- "traefik.http.routers.${NAME}-astro.rule=Host(`${ASTRO_HOST}`)"
|
||||
- "traefik.http.routers.${NAME}-astro.entrypoints=https"
|
||||
- "traefik.http.routers.${NAME}-astro.tls.certresolver=httpresolver"
|
||||
- "traefik.http.routers.${NAME}-astro.middlewares=security-headers-${NAME}-astro"
|
||||
@ -39,7 +39,7 @@ services:
|
||||
- ./data/media:/prod/dist/media
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_URL}`)
|
||||
- traefik.http.routers.${NAME}-payload.rule=Host(`${PAYLOAD_HOST}`)
|
||||
- traefik.http.routers.${NAME}-payload.entrypoints=https
|
||||
- traefik.http.routers.${NAME}-payload.tls.certresolver=httpresolver
|
||||
- traefik.docker.network=traefik_network
|
||||
|
@ -18,7 +18,7 @@ services:
|
||||
PAYLOAD_PORT: ${PAYLOAD_PORT}
|
||||
PAYLOAD_SECRET: ${PAYLOAD_SECRET}
|
||||
MONGODB_URI: ${MONGODB_URI}
|
||||
PAYLOAD_URL: ${PAYLOAD_URL}
|
||||
PAYLOAD_SERVER_URL: ${PAYLOAD_SERVER_URL}
|
||||
TOKEN: ${TOKEN}
|
||||
networks:
|
||||
- front
|
||||
|
@ -14,14 +14,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^8.2.0",
|
||||
"dotenv": "^16.1.4",
|
||||
"express": "^4.17.1",
|
||||
"payload": "^1.8.2"
|
||||
"payload": "^1.8.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/express": "^4.17.9",
|
||||
"nodemon": "^2.0.6",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.1.3"
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "^5.1.3"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user