Files
noahspan-flying/docker-compose.yaml
noahspannbauer d51e95f59e
Some checks failed
Pull Request / changes (pull_request) Successful in 57s
Pull Request / build-and-test (pull_request) Failing after 4m0s
adding infisical action to workflows
2026-07-13 08:04:16 -05:00

72 lines
2.3 KiB
YAML

version: '3.8'
services:
azurite:
container_name: azurite-flying
image: mcr.microsoft.com/azure-storage/azurite
ports:
- '10000:10000'
- '10001:10001'
- '10002:10002'
command: 'azurite --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 --loose --skipApiVersionCheck'
healthcheck:
test: ["CMD", "nc", "-z", "127.0.0.1", "10000"]
volumes:
- ./azurite-data:/data
seed:
image: mcr.microsoft.com/azure-cli
depends_on:
azurite:
condition: service_healthy
volumes:
- ./seed-data:/data
entrypoint: >
sh -c "
az storage container create --name mycontainer --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;' &&
az storage blob upload-batch --destination mycontainer --source /data --connection-string 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;'
"
restore:
container_name: restore
image: litestream/litestream:0.3.13
volumes:
- ./database/flying.db:/mnt/data/flying.db
- ./database/litestream/litestream.yml:/mnt/litestream/litestream.yml
- backup:/mnt/data/backup
- data:/mnt/data
command: restore -config /mnt/litestream/litestream.yml -if-db-not-exists -if-replica-exists /mnt/data/flying.db
app:
container_name: flying
build:
context: .
ports:
- '3000:3000'
env_file:
- ./api/.env
environment:
- DB_PATH=../../mnt/data/flying.db
volumes:
- data:/mnt/data
depends_on:
restore:
condition: service_completed_successfully
replicate:
container_name: replicate
image: litestream/litestream:0.3.13
volumes:
- ./database/litestream/litestream.yml:/mnt/litestream/litestream.yml
- backup:/mnt
- data:/mnt/data
command: replicate -config /mnt/litestream/litestream.yml
depends_on:
app:
condition: service_started
volumes:
azurite-data:
backup:
data:
seed-data: