diff options
| author | 2021-09-17 13:42:11 +0100 | |
|---|---|---|
| committer | 2021-09-17 13:42:11 +0100 | |
| commit | 90957a8d8d82ed229865558e60a84259677b996e (patch) | |
| tree | 3139a22711e0f0f67582b215b85ed147292a3edb /docker-compose.yml | |
| parent | Merge pull request #589 from python-discord/jb3/repos-update (diff) | |
| parent | Move psql health check to docker compose file (diff) | |
Merge pull request #588 from python-discord/revert-metricity-init-changes
Revert metricity init changes
Diffstat (limited to 'docker-compose.yml')
| -rw-r--r-- | docker-compose.yml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index 37678949..eb987624 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,13 @@ services: POSTGRES_DB: pysite POSTGRES_PASSWORD: pysite POSTGRES_USER: pysite + healthcheck: + test: ["CMD-SHELL", "pg_isready -U pysite"] + interval: 2s + timeout: 1s + retries: 5 + volumes: + - ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql web: build: @@ -33,7 +40,8 @@ services: ports: - "127.0.0.1:8000:8000" depends_on: - - postgres + postgres: + condition: service_healthy tty: true volumes: - .:/app:ro |