Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CloudComputing_Act1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jesus Galaz Reyes
CloudComputing_Act1
Commits
f5c5b005
Commit
f5c5b005
authored
4 months ago
by
Jesus Galaz
Browse files
Options
Downloads
Patches
Plain Diff
feat: add support for horizontal scaling with multiple back-end instances in docker-compose
parent
b528faec
No related branches found
No related tags found
1 merge request
!12
Resolve "Exercise 3 - Scaling: Mandatory features"
Pipeline
#16868
passed
4 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker-compose.yml
+17
-3
17 additions, 3 deletions
docker-compose.yml
with
17 additions
and
3 deletions
docker-compose.yml
+
17
−
3
View file @
f5c5b005
version
:
'
3.9'
services
:
services
:
mongodb
:
mongodb
:
image
:
mongo:latest
image
:
mongo:latest
...
@@ -9,14 +10,27 @@ services:
...
@@ -9,14 +10,27 @@ services:
-
MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
-
MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
-
MONGO_INITDB_DATABASE=todo-app
-
MONGO_INITDB_DATABASE=todo-app
todo-app
:
todo-app
-1
:
build
:
build
:
context
:
.
context
:
.
dockerfile
:
Dockerfile
dockerfile
:
Dockerfile
container_name
:
todo-app
container_name
:
todo-app
-1
ports
:
ports
:
-
"
80
:3000"
-
"
3001
:3000"
depends_on
:
depends_on
:
-
mongodb
-
mongodb
environment
:
environment
:
-
MONGO_URI=${MONGO_URI}
-
MONGO_URI=${MONGO_URI}
-
PORT=3000
todo-app-2
:
build
:
context
:
.
dockerfile
:
Dockerfile
container_name
:
todo-app-2
ports
:
-
"
3002:3000"
depends_on
:
-
mongodb
environment
:
-
MONGO_URI=${MONGO_URI}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment