21 lines
615 B
YAML
21 lines
615 B
YAML
version: '3.6'
|
|
|
|
services:
|
|
static:
|
|
command: /bin/sh -c "grep autoindex /etc/nginx/conf.d/default.conf >/dev/null 2>&1 || sed -i 's|index index.html index.htm;|index index.html index.htm;\n autoindex on;|' /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
|
|
image: nginx:alpine
|
|
labels:
|
|
- SERVICE_80_CHECK_TCP=true
|
|
- SERVICE_80_NAME=${COMPOSE_SERVICE_NAME}-static-80
|
|
- SERVICE_80_TAGS=${HOST_STATIC_SERVICE_80_TAGS:-urlprefix-localhost/*}
|
|
networks:
|
|
- public
|
|
ports:
|
|
- 80
|
|
restart: always
|
|
volumes:
|
|
- static:/usr/share/nginx/html:ro
|
|
|
|
volumes:
|
|
static:
|