-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from mantiumai/AlexN/redis-stack
Install redis-stack for vss
- Loading branch information
Showing
5 changed files
with
98 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Dockerfile.celery | ||
FROM mcr.microsoft.com/devcontainers/python:0-3.11 | ||
|
||
# Install Celery and any other dependencies | ||
RUN pip install --no-cache-dir celery | ||
|
||
# Set the command for the Celery worker | ||
CMD ["celery", "-A", "chirps", "worker", "--loglevel=info"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,15 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"image": "mcr.microsoft.com/devcontainers/python:0-3.11", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/rabbitmq-asdf:1": { | ||
"version": "latest", | ||
"erlangVersion": "latest" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/redis-homebrew:1": { | ||
"version": "latest" | ||
}, | ||
"ghcr.io/devcontainers-contrib/features/vault-asdf:2": { | ||
"version": "latest" | ||
} | ||
} | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "pip3 install --user -r requirements.txt", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
"name": "Python 3", | ||
"dockerComposeFile": "docker-compose.yml", | ||
"service": "app", | ||
"workspaceFolder": "/workspace", | ||
"shutdownAction": "stopCompose", | ||
"features": { | ||
"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", | ||
"runServices": ["redis", "celery", "rabbitmq", "vault"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
image: mcr.microsoft.com/devcontainers/python:0-3.11 | ||
volumes: | ||
- ..:/workspace:cached | ||
command: sleep infinity | ||
depends_on: | ||
- redis | ||
- celery | ||
- rabbitmq | ||
- vault | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
|
||
celery: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.celery | ||
volumes: | ||
- .:/workspace:cached | ||
depends_on: | ||
- rabbitmq | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
|
||
redis: | ||
image: redis/redis-stack:latest | ||
ports: | ||
- 6379:6379 | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
|
||
rabbitmq: | ||
image: rabbitmq:latest | ||
ports: | ||
- 5672:5672 | ||
- 15672:15672 | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
|
||
vault: | ||
image: hashicorp/vault:latest | ||
ports: | ||
- 8200:8200 | ||
environment: | ||
VAULT_DEV_ROOT_TOKEN_ID: myroot | ||
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200 | ||
networks: | ||
default: | ||
aliases: | ||
- localhost | ||
|
||
networks: | ||
default: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM python:3.11 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y git docker.io docker-compose | ||
|
||
WORKDIR /app | ||
COPY ../requirements.txt /app/ | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters