1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-24 21:52:59 +00:00
kiwi-scp/example/hello-world.project/docker-compose.yml

55 lines
1.2 KiB
YAML

version: "2"
networks:
# reachable from outside
default:
driver: bridge
# interconnects projects
kiwi_hub:
external:
name: ${KIWI_HUB_NAME}
services:
greeter:
# simple loop producing (rather boring) logs
image: alpine:latest
command: sh -c 'LOOP=1; while :; do echo Hello World "$$LOOP"; LOOP=$$(($$LOOP + 1)); sleep 10; done'
web:
# basic webserver listening on localhost:8080
build: web
restart: unless-stopped
ports:
- "8080:80"
db:
# internal mariadb (mysql) instance with persistent storage
image: mariadb:10
restart: unless-stopped
networks:
- kiwi_hub
environment:
MYSQL_ROOT_PASSWORD: changeme
volumes:
- "${TARGETDIR}/db:/var/lib/mysql"
adminer:
# admin interface for databases
image: adminer:standalone
restart: unless-stopped
networks:
- default
- kiwi_hub
depends_on:
- db
ports:
- "8081:8080"
another-web:
# Another webserver just to show off the ${CONFDIR} variable
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "8082:80"
volumes:
- "${CONFDIR}/html/index.html:/usr/share/nginx/html/index.html:ro"