container state check

This commit is contained in:
2024-12-28 13:32:17 +09:00
parent 72480b58f1
commit 107fa58cb2

View File

@@ -22,6 +22,8 @@ steps:
commands: commands:
- apk add --no-cache bash - apk add --no-cache bash
- chmod +x ./bin/update - chmod +x ./bin/update
- docker-compose up -d
- 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
@@ -37,7 +39,7 @@ steps:
- web - web
commands: commands:
- apk add --no-cache bash - apk add --no-cache bash
- until nc -z 127.0.0.1 8000; do echo "Waiting for web to be ready..."; sleep 5; done - until docker inspect -f '{{.State.Running}}' web | 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
@@ -46,6 +48,8 @@ steps:
image: python:3.12-alpine image: python:3.12-alpine
environment: environment:
MYSQL_PASSWORD: touchh MYSQL_PASSWORD: touchh
depends_on:
- db
commands: commands:
- apk add --no-cache mariadb-client mariadb-connector-c-dev gcc musl-dev pkgconfig - apk add --no-cache mariadb-client mariadb-connector-c-dev gcc musl-dev pkgconfig
- pip install -r requirements.txt - pip install -r requirements.txt
@@ -97,7 +101,6 @@ volumes:
- name: docker_sock - name: docker_sock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
- name: mysql_data - name: mysql_data
temp: {} temp: {}