django app volume mount

This commit is contained in:
2024-12-28 13:41:02 +09:00
parent 50fe26c4fe
commit 5fd3468083

View File

@@ -23,8 +23,7 @@ steps:
- apk add --no-cache bash - apk add --no-cache bash
- chmod +x ./bin/update - chmod +x ./bin/update
- docker-compose up -d - docker-compose up -d
- docker ps -a - until docker inspect -f '{{.State.Running}}' src-web-1 | grep true; do echo "Waiting for container to be running..."; sleep 5; done
- until docker inspect -f '{{.State.Running}}' web | grep true; do echo "Waiting for container to be running..."; sleep 5; done
- git branch --set-upstream-to=origin/PMSManager_refactor PMSManager_refactor || true - git branch --set-upstream-to=origin/PMSManager_refactor PMSManager_refactor || true
- ./bin/update - ./bin/update
@@ -40,7 +39,7 @@ steps:
- web - web
commands: commands:
- apk add --no-cache bash - apk add --no-cache bash
- until docker inspect -f '{{.State.Running}}' web | grep true; do echo "Waiting for container to be running..."; sleep 5; done - until docker inspect -f '{{.State.Running}}' src-web-1 | grep true; do echo "Waiting for container to be running..."; sleep 5; done
- chmod +x ./bin/cli - chmod +x ./bin/cli
- ./bin/cli migrate - ./bin/cli migrate
@@ -75,12 +74,13 @@ services:
environment: environment:
MYSQL_PASSWORD: touchh MYSQL_PASSWORD: touchh
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000'] command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
volumes:
- ./:/app
ports: ports:
- port: 8000 - port: 8000
depends_on: depends_on:
- db - db
volumes:
- name: app_volume
path: /app
# Сервис Telegram Bot # Сервис Telegram Bot
- name: bot - name: bot
@@ -106,8 +106,6 @@ volumes:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: mysql_data - name: mysql_data
temp: {} temp: {}
- name: app_volume
trigger: host:
event: path: ./
- push
- pull_request