This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26dd43c
commit 47907fc
Showing
13 changed files
with
559 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ARG VARIANT="3.10-bullseye" | ||
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | ||
|
||
ARG NODE_VERSION="none" | ||
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi | ||
|
||
RUN sudo apt update | ||
RUN sudo apt install postgresql -y && \ | ||
sudo service postgresql start && \ | ||
sudo -u postgres psql -c "CREATE USER vscode WITH PASSWORD 'c04e05b8-8fd1-4b20-96ed-6f0cb0ed40a2';" && \ | ||
sudo -u postgres psql -c "CREATE USER mealizedev WITH PASSWORD '6498fed5-8d49-4a85-82ee-03230c500fc6';" && \ | ||
sudo -u postgres psql -c "ALTER USER vscode WITH SUPERUSER;" && \ | ||
sudo -u postgres psql -c "CREATE DATABASE vscode WITH OWNER vscode" && \ | ||
sudo -u postgres psql -c "CREATE DATABASE mealize WITH OWNER mealizedev" | ||
|
||
ENV DATABASE_URL=postgresql://mealizedev:6498fed5-8d49-4a85-82ee-03230c500fc6@localhost/mealize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Useful links: | ||
// https://aka.ms/devcontainer.json | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.3/containers/python-3 | ||
// https://aka.ms/vscode-remote/containers/non-root | ||
|
||
{ | ||
"name": "Python 3", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "..", | ||
"args": { | ||
"VARIANT": "3.9", | ||
"NODE_VERSION": "16" | ||
} | ||
}, | ||
"settings": { | ||
}, | ||
"extensions": [ | ||
], | ||
"forwardPorts": [5000, 5432, 3000], | ||
"postCreateCommand": "pipenv install --dev && cd reactApp && npm install", | ||
"postStartCommand": "sudo service postgresql start", | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:3.9 | ||
|
||
ENV REACT_APP_BASE_URL=https://mealize.herokuapp.com/ | ||
ENV FLASK_APP=app | ||
ENV FLASK_ENV=production | ||
ENV SQLALCHEMY_ECHO=true | ||
|
||
WORKDIR /var/www | ||
|
||
COPY . . | ||
|
||
COPY /reactApp/build/* app/static | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pip install psycopg2 | ||
|
||
CMD gunicorn app:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[[source]] | ||
url="https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
click = "==7.1.2" | ||
gunicorn = "==20.1.0" | ||
itsdangerous = "==2.0.1" | ||
python-dotenv = "==0.14.0" | ||
six = "==1.15.0" | ||
Flask = "==2.0.1" | ||
Flask-Cors = "==3.0.8" | ||
Flask-SQLAlchemy = "==2.5.1" | ||
Flask-WTF = "==0.15.1" | ||
Jinja2 = "==3.0.1" | ||
MarkupSafe = "==2.0.1" | ||
SQLAlchemy = "==1.4.19" | ||
Werkzeug = "==2.0.1" | ||
WTForms = "==2.3.3" | ||
Flask-Migrate = "==3.0.1" | ||
Flask-Login = "==0.5.0" | ||
alembic = "==1.6.5" | ||
python-dateutil = "==2.8.1" | ||
python-editor = "==1.0.4" | ||
greenlet = "==1.1.0" | ||
Mako = "==1.1.4" | ||
email-validator = "==1.1.3" | ||
validators = "*" | ||
Faker = "==13.3.4" | ||
dnspython = "==2.2.1" | ||
idna = "==3.3" | ||
|
||
[dev-packages] | ||
psycopg2-binary = "==2.8.6" | ||
|
||
[requires] | ||
python_version = "3.9" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
psycopg2-binary==2.8.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-i https://pypi.org/simple | ||
alembic==1.6.5 | ||
click==7.1.2 | ||
dnspython==2.2.1; python_version >= '3.6' and python_version < '4.0' | ||
email-validator==1.1.3 | ||
faker==13.3.4 | ||
flask-cors==3.0.8 | ||
flask-login==0.5.0 | ||
flask-migrate==3.0.1 | ||
flask-sqlalchemy==2.5.1 | ||
flask-wtf==0.15.1 | ||
flask==2.0.1 | ||
greenlet==1.1.0 | ||
gunicorn==20.1.0 | ||
idna==3.3; python_version >= '3.5' | ||
itsdangerous==2.0.1 | ||
jinja2==3.0.1 | ||
mako==1.1.4 | ||
markupsafe==2.0.1 | ||
python-dateutil==2.8.1 | ||
python-dotenv==0.14.0 | ||
python-editor==1.0.4 | ||
setuptools==62.0.0; python_version >= '3.7' | ||
six==1.15.0 | ||
sqlalchemy==1.4.19 | ||
werkzeug==2.0.1 | ||
wtforms==2.3.3 | ||
|