-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker Compose configuration for Flutter, Express, FastAPI, and P…
…ostgreSQL services
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: '3.8' | ||
|
||
services: | ||
flutter: | ||
# Supondo que você tenha um Dockerfile configurado para o ambiente Flutter | ||
build: | ||
context: ./flutter-app | ||
volumes: | ||
- ./flutter-app:/app | ||
# Se precisar de um emulador ou dispositivo, considere soluções externas | ||
|
||
express-api: | ||
build: | ||
context: ./express-api | ||
environment: | ||
POSTGRES_HOST: db | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: mysecretpassword | ||
POSTGRES_DB: expressdb | ||
depends_on: | ||
- db | ||
ports: | ||
- "3000:3000" | ||
|
||
db: | ||
image: postgres | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: mysecretpassword | ||
POSTGRES_DB: expressdb | ||
volumes: | ||
- db-data:/var/lib/postgresql/data | ||
|
||
fastapi: | ||
build: | ||
context: ./fastapi-app | ||
command: > | ||
sh -c "pip install -r requirements.txt && | ||
huggingface-cli login && | ||
uvicorn main:app --host 0.0.0.0 --port 8000" | ||
ports: | ||
- "8000:8000" | ||
volumes: | ||
- ./fastapi-app:/app | ||
|
||
volumes: | ||
db-data: |