56 lines
1.4 KiB
YAML
56 lines
1.4 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'
|
|
volumes:
|
|
- ./azurite-data:/data
|
|
|
|
restore:
|
|
container_name: restore
|
|
image: litestream/litestream:0.3.13
|
|
volumes:
|
|
- ./database/flying.db:/var/lib/data/flying.db
|
|
- ./database/litestream/litestream.yml:/mnt/litestream/litestream.yml
|
|
- backup:/mnt/data/backup
|
|
- data:/var/lib/data
|
|
command: restore -config /mnt/litestream/litestream.yml -if-db-not-exists -if-replica-exists /var/lib/data/flying.db
|
|
|
|
app:
|
|
container_name: flying
|
|
build:
|
|
context: .
|
|
ports:
|
|
- '3000:3000'
|
|
env_file:
|
|
- ./api/.env
|
|
environment:
|
|
- DB_PATH=../../var/lib/data/flying.db
|
|
volumes:
|
|
- data:/var/lib/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:/var/lib/data
|
|
command: replicate -config /mnt/litestream/litestream.yml
|
|
depends_on:
|
|
app:
|
|
condition: service_started
|
|
|
|
volumes:
|
|
# azurite-data:
|
|
backup:
|
|
data: |