.gitea/workflows/services.yml aktualisiert
This commit is contained in:
@@ -3,7 +3,8 @@ on: push
|
||||
|
||||
env:
|
||||
# Global Env Variables readable in all jobs of this workflow
|
||||
MONGODB_CLUSTER_ADDRESS: mongodb
|
||||
MONGODB_CLUSTER_ADDRESS: mongodb # The network alias name of the mongodb docker service container
|
||||
# Env Variables which the Example JS App will access
|
||||
MONGODB_USERNAME: root
|
||||
MONGODB_PASSWORD: supersecretpassword
|
||||
MONGODB_DB_NAME: actionsenvironment
|
||||
@@ -11,12 +12,17 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Job will execute the Steps inside a 'node:latest' docker container
|
||||
container:
|
||||
image: node:latest
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
# Before running the Steps of this job...
|
||||
# The runner will spawm a second container 'mongodb' using the mongo:latest image with some db settings
|
||||
# The node container and the mongodb container will be in a new temporary docker bridge network
|
||||
mongodb:
|
||||
image: mongo:latest
|
||||
# Docker related container env Variables for the mongo image (JS App will not have these variables)
|
||||
env:
|
||||
MONGO_INITDB_DATABASE: actionsenvironment
|
||||
MONGO_INITDB_ROOT_USERNAME: root
|
||||
|
||||
Reference in New Issue
Block a user