Skip to content

Commit

Permalink
devcontainer initial setup
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufcanb committed Jan 22, 2024
1 parent 9a01390 commit 3c968bf
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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": []
}
}
}
24 changes: 24 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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:

0 comments on commit 3c968bf

Please sign in to comment.