Skip to content

Commit

Permalink
chore: use dockerfile to build mongo image in lieu of gitpod base image
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Jun 15, 2023
1 parent 030f18b commit 08f195c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gitpod/workspace-mongodb
FROM gitpod/workspace-full

RUN curl -fsSL https://deno.land/x/install/install.sh | sh
RUN /home/gitpod/.deno/bin/deno completions bash > /home/gitpod/.bashrc.d/90-deno && echo 'export DENO_INSTALL="/home/gitpod/.deno"' >> /home/gitpod/.bashrc.d/90-deno && echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> /home/gitpod/.bashrc.d/90-deno
5 changes: 4 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ image:

tasks:
- name: Start MongoDB
command: mkdir -p /workspace/data && mongod --dbpath /workspace/data
init: docker build -t hyper-mongodb .mongodb
command: |
mkdir -p /workspace/data
docker run -it -p 27017:27017 -v /workspace/data:/data/db hyper-mongodb
- name: Setup Git Hooks
init: git config core.hooksPath .hooks
Expand Down
1 change: 1 addition & 0 deletions .mongodb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mongo
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,22 @@ Run the unit tests, lint, and check formatting run:
deno task test
```

> To run the integration tests, you will need an instance of MongoDB running, along with setting
> `MONGO_URL` to your connection string. If you're developing in [`Gitpod`](https://gitpod.io), a
> MongoDB instance is automatically started for you
### Integration Tests

> If you're developing in [`Gitpod`](https://gitpod.io), a MongoDB instance is automatically started
> for you
To run the integration tests, you will need an instance of MongoDB running, along with setting
`MONGO_URL` to your connection string. For convenience you may use the `Dockerfile` in `.mongodb`
directory:

```sh
docker build -t hyper-mongodb .mongodb
docker run -it -p 27017:27017 hyper-mongodb
```

You can also use a MongoDB Atlas Instance, as long your `MONGO_URL` is set to the correct connection
string.

To run the tests on the adapter methods run:

Expand Down

0 comments on commit 08f195c

Please sign in to comment.