1
0
Fork 0
mirror of https://github.com/yavook/kiwi-scp.git synced 2024-11-22 21:03:00 +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
greeter:
2021-10-28 13:53:32 +00:00
# simple loop producing (rather boring) logs
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
web:
2021-10-28 13:53:32 +00:00
# basic webserver listening on localhost:8080
2020-08-24 12:49:39 +00:00
build: web
restart: unless-stopped
ports:
- "8080:80"
db:
2021-10-28 13:53:32 +00:00
# internal mariadb (mysql) instance with persistent storage
2020-08-24 12:49:39 +00:00
image: mariadb:10
restart: unless-stopped
networks:
- kiwi_hub
environment:
MYSQL_ROOT_PASSWORD: changeme
volumes:
- "${TARGETDIR}/db:/var/lib/mysql"
adminer:
2021-10-28 13:53:32 +00:00
# admin interface for databases
2020-08-24 12:49:39 +00:00
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-web:
2021-10-28 13:53:32 +00:00
# Another webserver just to show off the ${CONFDIR} variable
2020-08-24 12:49:39 +00:00
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "8082:80"
volumes:
- "${CONFDIR}/html/index.html:/usr/share/nginx/html/index.html:ro"