-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Type of issue
Missing information
Reference command name
az containerapp compose create
Feedback
There are a few features of docker-compose that I use for local runs that don't seem to map directly when I use az containerapp compose create.
I am using the following bash script for my build:
export LOCATION=eastus2
export RESOURCE_GROUP=rg-my-project
export ENV_NAME=env-my-project
az group create --name $RESOURCE_GROUP --location $LOCATION &&
az containerapp env create \
--name $ENV_NAME \
--resource-group $RESOURCE_GROUP \
--location $LOCATION &&
az containerapp compose create -g $RESOURCE_GROUP \
--environment $ENV_NAMEAnd my docker-compose looks something like this (I have removed sensitive info specific to my project):
name: my-project
services:
# A dependency service that I pull from a container registry
dependency-project:
restart: always
build:
context: ./stable
tags:
- "someurl.com/dependency-project:stable"
image: someurl.com/dependency-project:stable
env_file:
- .env
ports:
- "127.0.0.1:4001:4003"
- "127.0.0.1:4002:4004"
- "127.0.0.1:5900:5900"
# My locally-built service
my-project-service:
build: .
env_file:
- .env
stdin_open: true
tty: true
ports:
- "127.0.0.1:5001:5001"
volumes:
# This ties the container to the host timezone
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
# Logging direcotory
- ./logs:/app/logsI am having issues with the following features:
Port mapping
As you can see from my docker-compose file, I map multiple ports for one of the containers. az containerapp compose create makes me pick one when I run the command.
Volume Mounts
I map a log directory in my docker-compose. I assume I will have to configure some kind of Azure resource for volume mounting, but the documentation does not cover this.
Secret Environment Variables
My .env file will contain some sensitive info, which I will need to store in an Azure Key Vault. The documentation does not describe how to reference this in the docker-compose file.
Page URL
Content source URL
Author
Document Id
d10250cd-c6ca-a9a6-d6e8-b93f81b94ff1