Skip to content

Commit

Permalink
added the case if node container is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
moontrip committed Jul 27, 2024
1 parent 10f11b1 commit cdd378d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
test:
# DKDK environment name is the one defined in the corresponding repo > Setting > Environment
environment: testing
# Runner
runs-on: ubuntu-latest
# DKDK add container using docker hub's image, node
# to have full control for environment
# by having container, jobs are running at docker container, not at ubuntu-latest
container:
image: node:20
env:
Expand All @@ -25,7 +27,10 @@ jobs:

# DKDK here, to access service container, mongodb in the following
# so al env should match with the container's env
# Note that this assumes that service container is running under node:20 container
MONGODB_CONNECTION_PROTOCOL: mongodb
# if not using node:20 container, then MONGODB_CLUSTER_ADDRESS should be changed
# e.g., MONGODB_CLUSTER_ADDRESS: 127.0.0.1:27017
MONGODB_CLUSTER_ADDRESS: mongodb
MONGODB_USERNAME: root
MONGODB_PASSWORD: example
Expand All @@ -35,6 +40,9 @@ jobs:
# DKDK service name, mongodb or anything
mongodb:
image: mongo
# DKDK if service container is not running under container (node:20), then ports should be defined
# ports:
# - 27017:27017
env:
# DKDK this is stated at Docker hub's mongodb document
MONTO_INITDB_ROOT_USERNAME: root
Expand Down

0 comments on commit cdd378d

Please sign in to comment.