initial commit
This commit is contained in:
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
container_name: mynginx
|
||||
build:
|
||||
context: . # mappen där Dockerfile finns
|
||||
dockerfile: Dockerfile # din Dockerfile (från frågan)
|
||||
ports:
|
||||
- "80:80" # exponerar HTTP till HAProxy
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- web
|
||||
- infra-net
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O- http://localhost/health || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
networks:
|
||||
web:
|
||||
external: true # använder redan befintligt nät
|
||||
name: web
|
||||
infra-net:
|
||||
external: true # använder redan befintligt nät
|
||||
name: infra-net
|
||||
Reference in New Issue
Block a user