test
Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
parent
ec0e7601c4
commit
21fe6de0ec
18
.github/workflows/push.yml
vendored
18
.github/workflows/push.yml
vendored
@ -22,14 +22,14 @@ jobs:
|
||||
mkdir ${{ secrets.PATH }}
|
||||
cd ${{ secrets.PATH }}
|
||||
git clone -b prod https://github.com/${{ github.repository }} .
|
||||
mv .env.dev .env.prod
|
||||
sed -i "s/ASTRO_URL=.*/ASTRO_URL=${{ vars.ASTRO_URL }}/" .env.prod
|
||||
sed -i "s/PAYLOAD_URL=.*/PAYLOAD_URL=${{ vars.PAYLOAD_URL }}/" .env.prod
|
||||
sed -i "s/PAYLOAD_PORT=.*/PAYLOAD_PORT=${{ secrets.PAYLOAD_PORT }}/" .env.prod
|
||||
sed -i "s/PAYLOAD_SECRET=.*/PAYLOAD_SECRET=${{ secrets.PAYLOAD_SECRET }}/" .env.prod
|
||||
sed -i "s/MONGODB_URI=.*/MONGODB_URI=${{ secrets.MONGODB_URI }}/" .env.prod
|
||||
sed -i "s/MONGODB_USER=.*/MONGODB_USER=${{ secrets.MONGODB_USER }}/" .env.prod
|
||||
sed -i "s/MONGODB_PW=.*/MONGODB_PW=${{ secrets.MONGODB_PW }}/" .env.prod
|
||||
sed -i "s/NAME=.*/NAME=${{ vars.NAME }}/" .env.prod
|
||||
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
|
||||
sed -i "s/PAYLOAD_SECRET=.*/PAYLOAD_SECRET=${{ secrets.PAYLOAD_SECRET }}/" .env
|
||||
sed -i "s/MONGODB_URI=.*/MONGODB_URI=${{ secrets.MONGODB_URI }}/" .env
|
||||
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
|
||||
fi
|
||||
yarn prod
|
||||
|
@ -25,4 +25,4 @@ Because Astro is completely static, a content change in the CMS must trigger a n
|
||||
|
||||
Ensure you have Traefik set up as a reverse proxy before deployment. The prod script will launch your site in a production-ready environment.
|
||||
|
||||
Please note that since deployment is done through Github Workflows, you need to define the necessary secrets and envs in the settings. You can find which secrets and envs are used in the `.github/workflows/push.yml` file. This file converts the existing `.env.dev` to `.env.prod` and adds the secrets and envs that have already been defined.
|
||||
Please note that since deployment is done through Github Workflows, you need to define the necessary secrets and envs in the settings. You can find which secrets and envs are used in the `.github/workflows/push.yml` file. This file adds the secrets and envs to the `.env` that have already been defined.
|
||||
|
@ -2,9 +2,8 @@
|
||||
"name": "astrotus",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "docker compose -f docker-compose.yml -f docker-compose-dev.yml --env-file .env.dev up -d",
|
||||
"prod": "docker compose -f docker-compose.yml -f docker-compose-prod.yml --env-file .env.prod up -d --build",
|
||||
"stop": "docker compose -f docker-compose.yml -f docker-compose-dev.yml --env-file .env.dev down && docker compose -f docker-compose.yml -f docker-compose-prod.yml --env-file .env.prod down",
|
||||
"dump": "docker exec -i astrotus_database /bin/sh -c 'PGPASSWORD=password pg_dump --username directus directus' > ./dump.sql"
|
||||
"dev": "docker compose -f docker-compose.yml -f docker-compose-dev.yml up -d",
|
||||
"prod": "docker compose -f docker-compose.yml -f docker-compose-prod.yml up -d --build",
|
||||
"stop": "docker compose -f docker-compose.yml -f docker-compose-dev.yml down && docker compose -f docker-compose.yml -f docker-compose-prod.yml down"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user