Обновить docker-compose.yml

This commit is contained in:
Xanders25 2024-12-25 17:27:43 +02:00
parent 7adabce7da
commit d8f9aae9f8
1 changed files with 9 additions and 21 deletions

View File

@ -1,25 +1,13 @@
services: version: '3.8'
git_cloner:
image: alpine/git
volumes:
- /data/py:/repo
command: >
sh -c "
if [ ! -d /repo/.git ]; then
git clone https://git.xander.cx.ua/Xanders25/test_compos.git /repo &&
echo 'Repository cloned';
else
echo 'Repository already exists';
fi;
"
app: services:
flask-app:
build: build:
context: /data/py context: .
dockerfile: Dockerfile dockerfile: Dockerfile
working_dir: /app
command: python app.py
ports: ports:
- "5000:5000" - "5000:5000"
depends_on: volumes:
- git_cloner - .:/app
environment:
- FLASK_ENV=development