Skip to content

Commit

Permalink
use network in build
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Nov 29, 2024
1 parent a48c929 commit 689e539
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ jobs:
working-directory: ./server
run: sh setup-dev-server.sh -c cert.crt -k cert.key -d 0

- name: Build container image
working-directory: ./server
run: |
cp ../mock_tokens/tokens.json tokens.json
docker build -t ${{ env.IMAGE_NAME }} -f Dockerfile.gha .
- name: Run postgresql server in background
working-directory: ./server
run: sh run_dev_postgresql.sh -n postgreserver && sleep 6
# NOTE: Actually there is no need to publish the database container port

- name: Build container image
working-directory: ./server
run: |
cp ../mock_tokens/tokens.json tokens.json
docker build --network container:postgreserver -t ${{ env.IMAGE_NAME }} -f Dockerfile.gha .
- name: Run server in background
working-directory: ./server
run: PORT=8080 && docker run --name medperf_api --network container:postgreserver -d -p 127.0.0.1:8000:${PORT} -e PORT=${PORT} -e SSL_FLAGS="--certfile=cert.crt --keyfile=cert.key" ${{ env.IMAGE_NAME }}
Expand Down

0 comments on commit 689e539

Please sign in to comment.