Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Sample fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Mar 22, 2019
1 parent f5678fb commit 8d2eb2a
Show file tree
Hide file tree
Showing 19 changed files with 51 additions and 58 deletions.
2 changes: 1 addition & 1 deletion containers/node-8-mongo/.vscode/devContainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Node.js & Mongo DB",
"dockerComposeFile": "docker-compose.dev-container.yml",
"service": "app",
"service": "web",
"volume": "app",
"extensions": [
"dbaeumer.vscode-eslint"
Expand Down
2 changes: 1 addition & 1 deletion containers/node-8-mongo/docker-compose.dev-container.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '3'
services:
app:
web:
build:
context: .
dockerfile: dev-container.dockerfile
Expand Down
3 changes: 3 additions & 0 deletions containers/python-3-django/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.linting.pylintEnabled": true
}
4 changes: 2 additions & 2 deletions containers/python-3-django/dev-container.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3
FROM python:3-slim

ENV PYTHONUNBUFFERED 1

Expand All @@ -15,7 +15,7 @@ ADD . /app/
RUN apt-get update && apt-get -y install git

# Install any missing dependencies for enhanced language service
RUN apt-get install libicu
RUN apt-get install libicu57

# Clean up
RUN apt-get autoremove -y \
Expand Down
21 changes: 1 addition & 20 deletions containers/python-3-django/test-project/web_project/settings.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
"""
Django settings for web_project project.
Generated by 'django-admin startproject' using Django 2.1.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'y*h8iua%%z%fv&45hva&d1fx3pxvy$a*tx^ed9*970l3y5j+0p'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['0.0.0.0']
ALLOWED_HOSTS = ['0.0.0.0', 'localhost', '127.0.0.1']


# Application definition
Expand Down
15 changes: 0 additions & 15 deletions containers/python-3-django/test-project/web_project/urls.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
"""web_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

Expand Down
9 changes: 0 additions & 9 deletions containers/python-3-django/test-project/web_project/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
"""
WSGI config for web_project project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
Expand Down
28 changes: 28 additions & 0 deletions containers/python-3-flask-redis/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app.py",
"FLASK_ENV": "development",
"FLASK_DEBUG": "0"
},
"cwd": "${workspaceFolder}/test-project",
"args": [
"run",
"-h", "0.0.0.0",
"-p", "5000",
"--no-debugger",
"--no-reload"
],
"jinja": true
}
]
}
3 changes: 3 additions & 0 deletions containers/python-3-flask-redis/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.linting.pylintEnabled": true
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
FROM python:3
ADD . /code
WORKDIR /code
FROM python:3-slim

RUN mkdir /app
WORKDIR /app

ADD requirements.txt /app/
RUN pip install -r requirements.txt

RUN pip install pylint
CMD ["python", "app.py"]

# Install git
RUN apt-get update && apt-get -y install git

# Install any missing dependencies for enhanced language service
RUN apt-get install libicu
RUN apt-get install libicu57

# Clean up
RUN apt-get autoremove -y \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3
ADD . /code
WORKDIR /code
ADD . /app
WORKDIR /app
RUN pip install -r requirements.txt
CMD ["python", "app.py"]
3 changes: 1 addition & 2 deletions containers/python-3-jupyter/.vscode/devContainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"appPort": 8989,
"extensions": [
"ms-python.python",
"LittleFoxTeam.vscode-python-test-adapter",
"donjayamanne.jupyter"
"LittleFoxTeam.vscode-python-test-adapter"
]
}
2 changes: 1 addition & 1 deletion containers/python-3-jupyter/dev-container.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM jupyter/scipy-notebook
RUN apt-get update && apt-get -y install git

# Install any missing dependencies for enhanced language service
RUN apt-get install libicu
RUN apt-get install libicu57

# Clean up
RUN apt-get autoremove -y \
Expand Down

0 comments on commit 8d2eb2a

Please sign in to comment.