test_compos/docker-compose.yml

26 lines
539 B
YAML
Raw Normal View History

2024-12-16 18:34:12 +02:00
services:
2024-12-19 00:42:28 +02:00
git_cloner:
image: alpine/git
volumes:
2024-12-19 03:31:58 +02:00
- /data/py:/repo
2024-12-19 03:19:36 +02:00
command: >
sh -c "
if [ ! -d /repo/.git ]; then
git clone https://git.xander.cx.ua/Xanders25/test_compos.git /repo &&
2024-12-19 00:42:28 +02:00
echo 'Repository cloned';
else
echo 'Repository already exists';
2024-12-19 03:31:58 +02:00
fi;
"
2024-12-19 03:19:36 +02:00
app:
build:
2024-12-19 03:31:58 +02:00
context: /data/py
dockerfile: Dockerfile
2024-12-19 03:19:36 +02:00
working_dir: /app
command: python app.py
ports:
2024-12-19 03:31:58 +02:00
- "5000:5000"
2024-12-19 03:19:36 +02:00
depends_on:
- git_cloner