Skip to content

Commit

Permalink
🚀 first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfim-ibm committed Apr 21, 2022
0 parents commit 24a4298
Show file tree
Hide file tree
Showing 135 changed files with 11,684 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.2/containers/python-3/.devcontainer/base.Dockerfile

# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

RUN apt-get update \
&& apt-get -y install redis

USER vscode

RUN curl -sSL https://install.python-poetry.org | python3 -
39 changes: 39 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.154.2/containers/python-3
{
"name": "Python 3",
"dockerComposeFile": [
"docker-compose.yaml"
],
"workspaceFolder": "/workspaces/project-mognet",
"service": "mognet",
// Set *default* container specific settings.json values on container create.
"settings": {
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance"
],
"remoteEnv": {
"PYTHONPATH": "."
},
// 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",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
56 changes: 56 additions & 0 deletions .devcontainer/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: "2.4"

services:
mognet:
build:
context: ..
dockerfile: .devcontainer/Dockerfile
args:
VARIANT: "3.8"
INSTALL_NODE: "false"

mem_limit: 4g
cpus: 2
working_dir: /workspaces/project-mognet
volumes:
- ..:/workspaces/project-mognet:cached
- vscode_server_data:/home/vscode/.vscode-server
- cache:/home/vscode/.cache

command:
- bash
- -c
- |
set -e
sudo chown -R vscode:vscode /home/vscode/.vscode-server
sudo chown -R vscode:vscode /home/vscode/.cache
exec sleep infinity
redis:
image: redis
mem_limit: 128m
mem_reservation: 32m
cpus: 0.25
volumes:
- results_backend_data:/data
networks:
default:
aliases:
- cps-results-backend

rabbitmq:
image: rabbitmq:management
mem_limit: 512m
mem_reservation: 128m
cpus: 0.5
# Prevent huge memory usage by limiting the number
# of file descriptors
ulimits:
nofile:
soft: 8192
hard: 8192

volumes:
results_backend_data: {}
vscode_server_data: {}
cache: {}
4 changes: 4 additions & 0 deletions .github/dco.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This enables DCO bot for you, please take a look https://github.com/probot/dco
# for more details.
require:
members: false
Loading

0 comments on commit 24a4298

Please sign in to comment.