Skip to content

Commit 59d9a6a

Browse files
authored
Setup/gitpod (#384)
* Adding gitpod configurations * Renaming dockerfile * Removing extra start postgres command * Adding npm install init command * Updating dependencies to allow the application to run within Gitpod * More gitpod modifications * Update SlowStart.md Adding more details about the gitpod extension and how to start a workspace
1 parent 9080a6a commit 59d9a6a

5 files changed

Lines changed: 90 additions & 48 deletions

File tree

.gitpod.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM gitpod/workspace-postgres

.gitpod.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
image:
2+
file: .gitpod.Dockerfile
3+
4+
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
5+
# The creation of the .env file is just to help facilitate getting up and running quickly, none of these values should be used
6+
# in a production instance
7+
tasks:
8+
- init: npm install
9+
- init: |
10+
cat > .env << EOF
11+
NODE_ENV=development
12+
PORT=3000
13+
JWT_KEY=test123
14+
DATABASE_HOST=localhost
15+
DATABASE_PORT=5432
16+
DATABASE_USERNAME=gitpod
17+
DATABASE_NAME=postgres
18+
DATABASE_SCHEMA=public
19+
BYPASS_LOGIN=true
20+
EOF

docs/SlowStart.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ docker-compose up -d
4646
### docker-compose
4747

4848
To use the `docker-compose.yml` file included you will first need to set [environment variables](#environment-variables). It is not recommended to use `docker-compose` for any reason other than to test a solution for a separate front-end component.
49+
50+
## Running within Gitpod
51+
52+
You can build and run the application utilizing Gitpod if desired. You must have a Gitpod account, you can sign up for one here if desired: [Gitpod](https://gitpod.io/). If desired, you can also install a browser extension to make creating your "pods" easier [here](https://www.gitpod.io/docs/browser-extension/). Once you have created a Gitpod account and installed the extension, you can simply navigate to the [Bmore Responsive Github repository](https://github.com/CodeForBaltimore/Bmore-Responsive) and you will see a Gitpod button located at the top of the repo. Clicking on that button should open a Gitpod instance with a running Postgres Database. Once the pod has started, you will be able to run the commands needed to create and seed the Database and run the application. If you haven't installed the extension, then you can create a workspace by prefixing any GitHub URL with gitpod.io/#. For Bmore that would look like https://gitpod.io/#github.com/CodeForBaltimore/Bmore-Responsive

package-lock.json

Lines changed: 64 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"nodemailer": "^6.4.18",
5454
"nodemon": "2.0.7",
5555
"nunjucks": "^3.2.3",
56-
"pg": "7.18.2",
56+
"pg": "^8.5.1",
5757
"random-words": "1.1.1",
5858
"sequelize": "5.22.3",
5959
"snyk": "^1.459.0",

0 commit comments

Comments
 (0)