From 3c968bf2985c72be30960c0a802d160c55c7ea3e Mon Sep 17 00:00:00 2001 From: Yusuf Can Bayrak Date: Mon, 22 Jan 2024 21:56:06 +0100 Subject: [PATCH] devcontainer initial setup --- .devcontainer/Dockerfile | 17 +++++++++++++++++ .devcontainer/devcontainer.json | 15 +++++++++++++++ .devcontainer/docker-compose.yml | 24 ++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..6a39b60 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.8 + +RUN apt-get install gcc + +RUN pip install --upgrade pip +RUN pip3 install poetry + +WORKDIR /influxdb +RUN wget https://dl.influxdata.com/influxdb/releases/influxdb2-client-2.7.3-linux-amd64.tar.gz +RUN tar xvzf ./influxdb2-client-2.7.3-linux-amd64.tar.gz +RUN cp ./influx /usr/local/bin/ + + +WORKDIR /workspace + +# RUN poetry config virtualenvs.create false +# RUN poetry install --no-dev diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..c088df3 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,15 @@ +{ + "name": "enohub", + "dockerComposeFile": "docker-compose.yml", + "workspaceFolder": "/workspace", + "service": "app", + "postCreateCommand": "git clone https://github.com/yusufcanb/enohub.git /workspace", + "customizations": { + "vscode": { + "settings": { + "explorer.autoReveal": false + }, + "extensions": [] + } + } +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..bcb3fa9 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,24 @@ +version: '3' + +services: + app: + build: + context: . + dockerfile: Dockerfile + command: tail -f /dev/null + influxdb: + image: influxdb:2.6-alpine + environment: + - DOCKER_INFLUXDB_INIT_MODE=setup + - DOCKER_INFLUXDB_INIT_USERNAME=devcontainer + - DOCKER_INFLUXDB_INIT_PASSWORD=devcontainer + - DOCKER_INFLUXDB_INIT_ORG=default + - DOCKER_INFLUXDB_INIT_BUCKET=default + - DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=devcontainer-token + volumes: + - influxdbv2:/var/lib/influxdb2 + ports: + - 8086:8086 + +volumes: + influxdbv2: