1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-28 23:31:47 +02:00

nginx-nodejs-redis: add dev envs config

* Add Docker Desktop Development Environments config
* Upgrade NodeJS image
* Rename `nginx` to `proxy` and use bind mount for config
  for consistency with other examples

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This commit is contained in:
Milas Bowman 2022-07-11 16:38:24 -04:00
parent 9d547d23fb
commit a6048a745a
7 changed files with 182 additions and 66 deletions

View file

@ -0,0 +1,47 @@
services:
redis:
image: 'redislabs/redismod'
ports:
- '6379:6379'
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
web1:
build:
context: web
target: dev-envs
restart: on-failure
hostname: web1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
redis:
condition: service_healthy
web2:
build:
context: web
target: dev-envs
restart: on-failure
hostname: web2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
redis:
condition: service_healthy
proxy:
image: nginx
volumes:
- type: bind
source: ./proxy/nginx.conf
target: /etc/nginx/conf.d/default.conf
read_only: true
ports:
- '80:80'
depends_on:
- web1
- web2