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:
parent
9d547d23fb
commit
a6048a745a
7 changed files with 182 additions and 66 deletions
47
nginx-nodejs-redis/.docker/docker-compose.yaml
Normal file
47
nginx-nodejs-redis/.docker/docker-compose.yaml
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue