create .env generation script

This commit is contained in:
Amruth Pillai
2022-12-16 16:39:29 +01:00
parent 2ba6658a0b
commit f9b6aefffe
6 changed files with 84 additions and 14 deletions

View File

@ -2,18 +2,12 @@ tasks:
- name: Run PostgreSQL Database
command: docker run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres
- name: Restore Environment Variables
- name: Generate Environment Variables
command: |
if [ -f .env ]; then
echo "Found .env in workspace"
echo "Found .env in workspace, skipping generation"
else
if [ -z "${DOTENV}" ]; then
echo "Setting example .env"
cp .env.gitpod .env
else
echo "Restoring .env from Gitpod"
echo "${DOTENV}" | base64 -d > .env
fi
pnpm generate-env
fi
- name: Install Project Dependencies