Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 16 additions & 54 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,22 @@
services:
database:
image: postgres:17
container_name: api_database
restart: always
deploy:
resources:
limits:
cpus: '2'
memory: 2G
secrets:
- db-password
ports:
- 5555:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD_FILE: /run/secrets/db-password
POSTGRES_DB: postgres
volumes:
- database_volume:/var/lib/postgresql/data
networks:
- api_network
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 5s
timeout: 3s
retries: 5

api:
container_name: FastAPI
fsdc_api_staging:
container_name: fsdc_api_staging
build:
context: .
ports:
- 5071:8000
restart: always
secrets:
- db-password
- 5073:8000
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD_FILE: /run/secrets/db-password
POSTGRES_DB: postgres
POSTGRES_PORT: 5555

webapp:
container_name: fsdc_webapp
image: ghcr.io/econlabs/econlabs/fsdc-webapp:staging
restart: always
ports:
- 5070:3000

POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: fsdc_db_staging
POSTGRES_PORT: 5432
POSTGRES_HOST: postgres
labels:
- "com.centurylinklabs.watchtower.enable=true"
networks:
- postgres_network
volumes:
- ./data_staging:/app/data
networks:
api_network:

volumes:
database_volume:
data_folder:

secrets:
db-password:
file: password.txt
postgres_network:
external: true
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fsdc-api"
version = "0.1.0"
version = "0.1.1"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
Expand All @@ -19,4 +19,6 @@ dependencies = [
"requests>=2.32.3",
"sqlmodel>=0.0.22",
"tqdm>=4.67.1",
"comtradeapicall>=1.2.1",
"pysal>=25.1",
]
Loading
Loading