diff options
author | 2024-08-16 17:53:52 +0100 | |
---|---|---|
committer | 2024-08-16 17:53:52 +0100 | |
commit | 71d1ea51a4e9ccafd56bdcb5dba126f2b1831a36 (patch) | |
tree | 354c4d5c077036b22db6d1a8717fdb1540807929 /docker-compose.yml | |
parent | Add a basic litestar app (diff) |
Move to fastapi & mono repo layout
Diffstat (limited to 'docker-compose.yml')
-rw-r--r-- | docker-compose.yml | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index b57b147..f3f9844 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,29 @@ services: + postgres: + restart: unless-stopped + image: postgres:16-alpine + environment: + POSTGRES_DB: thallium + POSTGRES_PASSWORD: thallium + POSTGRES_USER: thallium + healthcheck: + test: ["CMD-SHELL", "pg_isready -U thallium"] + interval: 2s + timeout: 1s + retries: 5 + ports: + - "15432:5432" + thallium: - build: . + build: thallium-backend restart: unless-stopped - command: ["thallium.app:app", "--host", "0.0.0.0", "--port", "80", "--reload"] - volumes: - - ./thallium:/thallium/thallium:ro + command: ["src.app:fastapi_app", "--host", "0.0.0.0", "--port", "80", "--reload"] + # volumes: + # - ./thallium:/thallium/thallium:ro env_file: - .env ports: - - "127.0.0.1:8000:80" + - "8000:80" + depends_on: + postgres: + condition: service_healthy |