Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
# Image for a Python 3 development environment
FROM python:3.11-slim
FROM quay.io/rofrano/nyu-devops-base:su25

# Add any tools that are needed beyond Python 3.11
RUN apt-get update && \
apt-get install -y sudo vim make git zip tree curl wget jq procps net-tools && \
apt-get autoremove -y && \
apt-get clean -y

# Create a user for development
ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

# Create the user with passwordless sudo privileges
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
&& usermod -aG sudo $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
&& chown -R $USERNAME:$USERNAME /home/$USERNAME

# Set up the Python development environment
# Set up the global Python development environment
WORKDIR /app
COPY Pipfile Pipfile.lock ./
RUN python -m pip install -U pip pipenv && \
Expand Down
4 changes: 3 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"FLASK_DEBUG:": "True",
"FLASK_APP": "wsgi:app",
"PORT": "8080",
"GUNICORN_BIND": "0.0.0.0:8080"
"GUNICORN_BIND": "0.0.0.0:8080",
"PIPENV_VENV_IN_PROJECT": "1"
},
"customizations": {
"vscode": {
Expand All @@ -37,6 +38,7 @@
"python.testing.pytestArgs": [
"tests"
],
"python.analysis.typeCheckingMode": "standard",
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
Expand Down
16 changes: 8 additions & 8 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ flask = "==3.1.1"
redis = "==5.2.1"
flask-redis = "==0.4.0"
retry2 = "==0.9.5"
python-dotenv = "==1.0.1"
gunicorn = "==23.0.0"
python-dotenv = "~=1.1.0"
gunicorn = "~=23.0.0"

[dev-packages]
honcho = "~=2.0.0"
pylint = "~=3.3.4"
flake8 = "~=7.1.1"
black = "~=25.1.0"
pytest = "~=8.3.4"
coverage = "~=7.8.2"
flake8 = "~=7.2.0"
pylint = "~=3.3.7"
pytest = "~=8.3.5"
pytest-pspec = "~=0.0.4"
pytest-cov = "~=6.0.0"
pytest-cov = "~=6.1.1"
factory-boy = "~=3.3.3"
coverage = "~=7.6.12"
honcho = "~=2.0.0"
httpie = "~=3.2.4"

[requires]
Expand Down
Loading