Skip to content

Commit f6a4da5

Browse files
Initial commit
0 parents  commit f6a4da5

31 files changed

+1904
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# The Skills Network Cloud IDE uses Ubuntu 18.04 :(
2+
FROM ubuntu:18.04
3+
4+
# Add any tools that are needed
5+
RUN apt-get update && \
6+
apt-get install -y sudo \
7+
vim \
8+
make \
9+
git \
10+
zip \
11+
tree \
12+
curl \
13+
wget \
14+
jq \
15+
software-properties-common \
16+
python3-pip \
17+
python3-dev
18+
19+
# Installing K3D for local Kubernetes development
20+
RUN curl -s "https://raw.githubusercontent.com/rancher/k3d/main/install.sh" | sudo bash
21+
22+
# Installing Tekton CLI
23+
RUN curl -LO https://github.com/tektoncd/cli/releases/download/v0.18.0/tkn_0.18.0_Linux_x86_64.tar.gz && \
24+
tar xvzf tkn_0.18.0_Linux_x86_64.tar.gz -C /usr/local/bin/ tkn && \
25+
ln -s /usr/local/bin/tkn /usr/bin/tkn
26+
27+
# Install OpenShift CLI
28+
RUN curl -LO https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \
29+
tar xvzf openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \
30+
install openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc /usr/local/bin/oc && \
31+
ln -s /usr/local/bin/oc /usr/bin/oc
32+
33+
# Create a user for development
34+
ARG USERNAME=theia
35+
ARG USER_UID=1000
36+
ARG USER_GID=$USER_UID
37+
38+
# Create the user with passwordless sudo privileges
39+
RUN groupadd --gid $USER_GID $USERNAME \
40+
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
41+
&& usermod -aG sudo $USERNAME \
42+
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
43+
&& chmod 0440 /etc/sudoers.d/$USERNAME
44+
45+
# Set up the Python development environment
46+
WORKDIR /home/project
47+
RUN python3 -m pip install --upgrade pip wheel
48+
49+
ENV PORT 8000
50+
EXPOSE $PORT
51+
52+
# Enable color terminal for docker exec bash
53+
ENV TERM=xterm-256color
54+
55+
# Become a regular user
56+
USER $USERNAME

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// spell: disable
2+
{
3+
"name": "Cloud IDE",
4+
"dockerFile": "Dockerfile",
5+
"context": "..",
6+
"remoteUser": "theia",
7+
"workspaceFolder": "/home/project",
8+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/project,type=bind,consistency=delegated",
9+
"runArgs": ["-h","theia", "--name", "capstone-project"],
10+
"remoteEnv": {
11+
"FLASK_DEBUG": "True"
12+
},
13+
"extensions": [
14+
"VisualStudioExptTeam.vscodeintellicode",
15+
"ms-python.python",
16+
"ms-python.pylint",
17+
"ms-python.vscode-pylance",
18+
"alexkrechik.cucumberautocomplete",
19+
"cstrap.flask-snippets",
20+
"yzhang.markdown-all-in-one",
21+
"bierner.github-markdown-preview",
22+
"hnw.vscode-auto-open-markdown-preview",
23+
"DavidAnson.vscode-markdownlint",
24+
"donjayamanne.githistory",
25+
"GitHub.vscode-pull-request-github",
26+
"hbenl.vscode-test-explorer",
27+
"LittleFoxTeam.vscode-python-test-adapter",
28+
"njpwerner.autodocstring",
29+
"redhat.vscode-yaml",
30+
"streetsidesoftware.code-spell-checker",
31+
"wholroyd.jinja",
32+
"rangav.vscode-thunder-client"
33+
],
34+
// "postCreateCommand": "sudo pip install -r requirements.txt",
35+
"features": {
36+
"docker-in-docker": "latest",
37+
"kubectl-helm-minikube": "latest"
38+
}
39+
}

.flaskenv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FLASK_RUN_PORT=8000
2+
FLASK_APP=service:app

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
*.{cmd,[cC][mM][dD]} text eol=crlf
3+
*.{bat,[bB][aA][tT]} text eol=crlf

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Local OS metadata
2+
.DS_Store
3+
Thumbs.db
4+
5+
# Nose
6+
.noseids
7+
8+
# Vagrant
9+
.vagrant
10+
11+
# Test reports
12+
unittests.xml
13+
14+
# databases
15+
*.db
16+
db/*
17+
!db/.keep
18+
19+
# SonarQube Reports
20+
.scannerwork/
21+
.sonarlint/
22+
23+
# Byte-compiled / optimized / DLL files
24+
__pycache__/
25+
*.py[cod]
26+
*$py.class
27+
28+
# C extensions
29+
*.so
30+
31+
# Distribution / packaging
32+
.Python
33+
env/
34+
build/
35+
develop-eggs/
36+
dist/
37+
downloads/
38+
eggs/
39+
.eggs/
40+
lib/
41+
lib64/
42+
parts/
43+
sdist/
44+
var/
45+
*.egg-info/
46+
.installed.cfg
47+
*.egg
48+
49+
# PyInstaller
50+
# Usually these files are written by a python script from a template
51+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
52+
*.manifest
53+
*.spec
54+
55+
# Installer logs
56+
pip-log.txt
57+
pip-delete-this-directory.txt
58+
59+
# Unit test / coverage reports
60+
htmlcov/
61+
.tox/
62+
.coverage
63+
.coverage.*
64+
.cache
65+
nosetests.xml
66+
coverage.xml
67+
*,cover
68+
.hypothesis/
69+
70+
# Translations
71+
*.mo
72+
*.pot
73+
74+
# Django stuff:
75+
*.log
76+
local_settings.py
77+
78+
# Flask stuff:
79+
instance/
80+
.webassets-cache
81+
82+
# Scrapy stuff:
83+
.scrapy
84+
85+
# Sphinx documentation
86+
docs/_build/
87+
88+
# PyBuilder
89+
target/
90+
91+
# IPython Notebook
92+
.ipynb_checkpoints
93+
94+
# pyenv
95+
.python-version
96+
97+
# celery beat schedule file
98+
celerybeat-schedule
99+
100+
# dotenv
101+
.env
102+
103+
# virtualenv
104+
.venv
105+
venv/
106+
ENV/
107+
108+
# Spyder project settings
109+
.spyderproject
110+
111+
# Rope project settings
112+
.ropeproject

0 commit comments

Comments
 (0)