Skip to content

Commit

Permalink
Try commands for building and running backend tests in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
CalPinSW committed May 30, 2024
1 parent 89069bc commit a4835f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ jobs:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: echo Hello World
- uses: actions/checkout@v2
- run: docker build --target test --tag backend:test ./backend/
- run: docker run --env-file backend/.env backend:test
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,16 @@ From the project root run `docker compose up`

Build backend docker image with `docker build --target development --tag backend:dev ./backend/`

Build backend tests docker image with `docker build --target test --tag backend:test ./backend/`

Build the frontend docker image with `docker build --tag frontend:dev ./frontend/`

Run backend in development mode from the backend folder with `docker run --env-file .env -p 5000:5000 --mount "type=bind,source=$(pwd)/src,target=/backend/src" backend:dev`

Run frontend in development mode from the backend folder with `docker run -it --init --env-file .env -p 1234:1234 --mount "type=bind,source=$(pwd)/src,target=/frontend/src" frontend:dev --entrypoint=/bin/bash`

Run backend tests docker image from the project root with `docker run --env-file backend/.env backend:test`

## Provisioning VMs with Ansible

VMs can be prepared and configured with Ansible from the `/ansible` directory. To set up managed nodes, set the IP addresses in `ansible-inventory`. Your control node will need to have SSH access to these nodes (this can be done from a mac, or another VM with the repo installed).
Expand Down

0 comments on commit a4835f0

Please sign in to comment.