Skip to content

Commit 9b2890d

Browse files
committed
Update dev container
1 parent 432a251 commit 9b2890d

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# Note: You can use any Debian/Ubuntu based image you want.
21
FROM mcr.microsoft.com/devcontainers/python:3.7-bullseye
32

43
RUN \
54
apt update && \
65
apt-get install bash-completion graphviz default-mysql-client -y && \
76
pip install flake8 black faker ipykernel
87

9-
ENV DJ_HOST localhost
8+
ENV DJ_HOST fakeservices.datajoint.io
109
ENV DJ_USER root
1110
ENV DJ_PASS simple

.devcontainer/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
22
{
3-
"name": "Development",
3+
"name": "DataJoint Tutorial",
44
"dockerComposeFile": "docker-compose.yaml",
55
"service": "app",
66
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
@@ -16,7 +16,11 @@
1616
"ghcr.io/guiyomh/features/vim:0": {}
1717
},
1818
"onCreateCommand": "pip install -e .",
19-
"postStartCommand": "MYSQL_VER=8.0 docker compose -f ./docker/docker-compose.yml down && MYSQL_VER=8.0 docker compose -f ./docker/docker-compose.yml up --build --wait",
19+
"postStartCommand": "MYSQL_VER=8.0 docker compose down && MYSQL_VER=8.0 docker compose up --build --wait",
20+
"hostRequirements": {
21+
"cpus": 2,
22+
"memory": "4gb"
23+
},
2024
"forwardPorts": [
2125
3306
2226
],

docker-compose.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
# MYSQL_VER=5.7 docker compose -f ./docker/docker-compose.yml up --build
1+
# MYSQL_VER=8.0 docker compose up --build
22
version: "2.4"
3-
x-net:
4-
&net
5-
networks:
6-
- main
73
services:
84
db:
9-
<<: *net
105
image: datajoint/mysql:${MYSQL_VER}
116
environment:
127
- MYSQL_ROOT_PASSWORD=${DJ_PASS}
@@ -16,6 +11,4 @@ services:
1611
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
1712
timeout: 30s
1813
retries: 5
19-
interval: 15s
20-
networks:
21-
main:
14+
interval: 15s

0 commit comments

Comments
 (0)