awesome-compose/nginx-nodejs-redis/.docker/docker-compose.yaml
Milas Bowman a6048a745a 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>
2022-07-11 16:39:34 -04:00

48 lines
888 B
YAML

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