Skip to content

Commit

Permalink
use docker-in-docker feature
Browse files Browse the repository at this point in the history
move dockerfile
  • Loading branch information
alex-nork committed Jul 13, 2023
1 parent 60e1cf7 commit 828fa88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
13 changes: 5 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"features": {
"ghcr.io/devcontainers-contrib/features/rabbitmq-asdf:1": {
"version": "latest",
"erlangVersion": "latest"
},
"ghcr.io/devcontainers-contrib/features/vault-asdf:2": {
"version": "latest"
}
"ghcr.io/devcontainers-contrib/features/rabbitmq-asdf:1": {},
"ghcr.io/devcontainers-contrib/features/vault-asdf:2": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"forwardPorts": [4369, 5672, 6379, 8000],
"postCreateCommand": "docker-compose up -d"
"postCreateCommand": "docker-compose up -d",
"runServices": ["redis", "celery", "rabbitmq", "vault"]
}
File renamed without changes.
32 changes: 0 additions & 32 deletions chirps/base_app/management/commands/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,3 @@ def handle(self, *args, **options):
os.system('docker-compose -f /workspace/.devcontainer/docker-compose.yml down')
elif options['status']:
os.system('docker-compose -f /workspace/.devcontainer/docker-compose.yml ps')


# """Management command for interacting with redis."""
# import os

# from django.core.management.base import BaseCommand


# class Command(BaseCommand):
# """Management command for interacting with redis."""

# help = 'Interact with the local redis development server'

# def add_arguments(self, parser):
# """Add arguments to redis command"""
# parser.add_argument('--start', action='store_true', help='Start redis server')
# parser.add_argument('--stop', action='store_true', help='Stop redis server')
# parser.add_argument('--status', action='store_true', help='Check redis server status')

# def handle(self, *args, **options):
# """Handle redis command"""
# docker_compose_path = shutil.which("docker-compose")
# if not docker_compose_path:
# self.stdout.write(self.style.ERROR("docker-compose not found. Please ensure it is installed."))
# return

# if options['start']:
# os.system(f'{docker_compose_path} -f /workspace/.devcontainer/docker-compose.yml up -d redis')
# elif options['stop']:
# os.system(f'{docker_compose_path} -f /workspace/.devcontainer/docker-compose.yml down')
# elif options['status']:
# os.system(f'{docker_compose_path} -f /workspace/.devcontainer/docker-compose.yml ps')

0 comments on commit 828fa88

Please sign in to comment.