mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-12 15:52:56 +10:00
add postgres to gitpod
This commit is contained in:
@ -1 +1,3 @@
|
|||||||
FROM gitpod/workspace-postgresql
|
FROM gitpod/workspace-postgresql
|
||||||
|
|
||||||
|
RUN pg_start
|
||||||
32
.gitpod.yml
32
.gitpod.yml
@ -1,27 +1,33 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Restore .env file
|
- name: Restore .env file, or create a new one
|
||||||
command: |
|
command: |
|
||||||
if [ -f .env ]; then
|
if [ -f .env ]; then
|
||||||
# If this workspace already has a .env, don't override it
|
|
||||||
# Local changes survive a workspace being opened and closed
|
|
||||||
# but they will not persist between separate workspaces for the same repo
|
|
||||||
echo "Found .env in workspace"
|
echo "Found .env in workspace"
|
||||||
else
|
else
|
||||||
if [ -z "${DOTENV}" ]; then
|
if [ -z "${DOTENV}" ]; then
|
||||||
# There is no $DOTENV from a previous workspace
|
|
||||||
# Default to the example .env
|
|
||||||
echo "Setting example .env"
|
echo "Setting example .env"
|
||||||
cp .env.example .env
|
cp .env.gitpod .env
|
||||||
else
|
else
|
||||||
# After making changes to .env, run this line to persist it to $DOTENV
|
|
||||||
# gp env DOTENV="$(base64 .env | tr -d '\n')"
|
|
||||||
#
|
|
||||||
# Environment variables set this way are shared between all your workspaces for this repo
|
|
||||||
# The lines below will read $DOTENV and print a .env file
|
|
||||||
echo "Restoring .env from Gitpod"
|
echo "Restoring .env from Gitpod"
|
||||||
echo "${DOTENV}" | base64 -d > .env
|
echo "${DOTENV}" | base64 -d > .env
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- init: pnpm install
|
- name: Set up dependencies, and run the development server
|
||||||
|
init: pnpm install
|
||||||
command: pnpm dev
|
command: pnpm dev
|
||||||
|
|
||||||
|
ports:
|
||||||
|
# PostgreSQL
|
||||||
|
- port: 5432
|
||||||
|
visibility: private
|
||||||
|
|
||||||
|
# Client
|
||||||
|
- port: 3100
|
||||||
|
visibility: public
|
||||||
|
onOpen: ignore
|
||||||
|
|
||||||
|
# Client
|
||||||
|
- port: 3000
|
||||||
|
visibility: public
|
||||||
|
onOpen: open-browser
|
||||||
|
|||||||
Reference in New Issue
Block a user