Specify profile for docker compose in config
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker, docker-compose, javascript
- Domain
- devops
Research direction
Start by tracing how the plugin reads custom config.docker and constructs the docker compose up command. Add support for an optional profile or profiles value, then verify with a compose file containing local and test profiles that only the selected profile starts.
Written by the indexing model from the issue text.
Description
Problem
I have multiple profiles configured in my docker-compose.yml file. I would like to only run the containers tagged with a particular profile with via this plugin's docker compose up command.
Example
Example compose file:
# docker-compose.yml
services:
localstack:
profiles:
- local
container_name: '${LOCALSTACK_DOCKER_NAME:-localstack-main}'
image: localstack/localstack
ports:
- 4566:4566 # LocalStack Gateway
- 4510-4559:4510-4559 # external services port range
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- DEBUG=${DEBUG:-0}
volumes:
- '${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
redis-local:
profiles:
- local
image: redis:7.2.4-alpine
ports:
- 6379:6379
command: redis-server --logLevel notice --requirepass pass
redis-test:
profiles:
- test
image: redis:7.2.4-alpine
ports:
- 6379:6379
command: redis-server --logLevel notice --requirepass pass
And the compose up command:
docker compose --profile local up -f docker-compose.yml
Read more about compose profiles here.
When specifying the local profile it shouldn't create the redis-test container.
Suggested solution
Can add an optional parameter to config.docker to specify the profile(s) to be run in the docker compose up command.
e.g.
custom:
localstack:
docker:
profiles:
- local
- Dominant language
- JavaScript
- Stars
- 542
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from localstack/serverless-localstack
-
Difficulty 1/5 Under an hour Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
aws:apigateway status: backlog
Difficulty 4/5 3-5 days Newbie friendliness 35/100
localstack/serverless-localstack#270 · 3 reactions ·
All issues in localstack/serverless-localstack
Similar issues
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SignalK/n2k-signalk#345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaPluto/PlutoPlotly.jl#72 ·