planetary-computer-apis/docker-compose.yml

133 строки
3.2 KiB
YAML

services:
stac:
platform: linux/amd64
image: pc-apis-stac
build:
context: .
dockerfile: pcstac/Dockerfile
env_file: ${PC_STAC_ENV_FILE:-./pc-stac.dev.env}
ports:
- "8081:8081"
volumes:
- ./pccommon:/opt/src/pccommon
- ./pcstac:/opt/src/pcstac
depends_on:
- database
- azurite
- redis
command: >
bash -c "pypgstac pgready && uvicorn pcstac.main:app --host 0.0.0.0 --port 8081 --reload --proxy-headers --root-path '/stac'"
tiler:
image: pc-apis-tiler
# For Mac OS M1 user, you'll need to add `platform: linux/amd64`.
# see https://github.com/developmentseed/titiler/discussions/387#discussioncomment-1643110
platform: linux/amd64
build:
context: .
dockerfile: pctiler/Dockerfile
env_file: ${PC_TILER_ENV_FILE:-./pc-tiler.dev.env}
environment:
# Allow proxied managed identity requests in dev
- IDENTITY_ENDPOINT=http://token-proxy:8086/dev/token
- IMDS_ENDPOINT=active
ports:
- "8082:8082"
volumes:
- ./pctiler:/opt/src/pctiler
- ./pctiler/templates:/opt/src/templates
- ./pccommon:/opt/src/pccommon
depends_on:
- database
command: [ "uvicorn", "pctiler.main:app", "--host", "0.0.0.0", "--port", "8082", "--reload", "--proxy-headers", "--root-path", "/data" ]
funcs:
image: pc-apis-funcs
platform: linux/amd64
build:
context: .
dockerfile: pcfuncs/Dockerfile
env_file: ${PC_FUNCS_ENV_FILE:-./pc-funcs.dev.env}
ports:
- "8083:80"
volumes:
- ./pccommon:/home/site/pccommon
- ./pcfuncs:/home/site/wwwroot
- .:/opt/src
- ~/.azure:/home/.azure
nginx:
image: pc-apis-nginx
container_name: pc-apis-nginx
build:
context: ./nginx
dockerfile: Dockerfile
links:
- database
- azurite
- redis
depends_on:
- database
- azurite
- redis
volumes:
- ./nginx/etc/nginx:/etc/nginx
ports:
- 8080:80
database:
container_name: pc-stac-db
image: pc-apis-stac-db
build:
context: ./pgstac
dockerfile: Dockerfile
environment:
- POSTGRES_USER=username
- POSTGRES_PASSWORD=password
- POSTGRES_DB=postgis
ports:
- "5432:5432"
volumes:
- pc-apis-pgdata:/var/lib/postgresql/data
token-proxy:
image: pc-aux-token-proxy
build:
context: ./auxiliary/az-cli-proxy
dockerfile: Dockerfile
ports:
- 8086:8086
volumes:
- ./auxiliary/az-cli-proxy:/opt/src/
- ~/.azure:/root/.azure
azurite:
container_name: pcapis-azurite
image: mcr.microsoft.com/azure-storage/azurite:3.30.0
hostname: azurite
command: "azurite --silent --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost
0.0.0.0 -l /workspace"
ports:
- "10000:10000" # Blob
- "10001:10001" # Queue
- "10002:10002" # Table
volumes:
- pc-apis-azurite-data:/workspace
redis:
image: redis:6.2.6-buster
command: redis-server --port 6380 --requirepass devcache
ports:
- "6380:6380"
volumes:
- pc-apis-redis-data:/data
volumes:
pc-apis-pgdata:
pc-apis-azurite-data:
pc-apis-redis-data:
networks:
default:
name: pc-apis-dev-network