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

56 lines
1.2 KiB
YAML
Raw Normal View History

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