Skip to content

Commit

Permalink
set FLASK_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
rberrelleza committed Aug 7, 2019
1 parent 7f0e600 commit c2ec0a2
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 24 deletions.
16 changes: 10 additions & 6 deletions coder/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ def hello():


if __name__ == "__main__":
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files = []
if "development" == os.getenv("FLASK_ENV"):
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files=[
"./static/stylesheets/style.css"
]

app.run(
host='0.0.0.0',
port=8080,
debug=True,
extra_files=[
"./static/stylesheets/style.css"
])
extra_files=extra_files
)
2 changes: 2 additions & 0 deletions coder/okteto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: vote
image: okteto/coder-python:latest
workdir: /home/coder/project
command: ["dumb-init", "code-server", "--no-auth", "--allow-http"]
environment:
- FLASK_ENV=development
forward:
- 8443:8443
- 8080:8080
16 changes: 10 additions & 6 deletions helm/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ def hello():


if __name__ == "__main__":
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files = []
if "development" == os.getenv("FLASK_ENV"):
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files=[
"./static/stylesheets/style.css"
]

app.run(
host='0.0.0.0',
port=8080,
debug=True,
extra_files=[
"./static/stylesheets/style.css"
])
extra_files=extra_files
)
2 changes: 2 additions & 0 deletions helm/okteto.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: vote
command: ["python", "app.py"]
workdir: /src
environment:
- FLASK_ENV=development
forward:
- 8080:8080
16 changes: 10 additions & 6 deletions python/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ def hello():


if __name__ == "__main__":
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files = []
if "development" == os.getenv("FLASK_ENV"):
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files=[
"./static/stylesheets/style.css"
]

app.run(
host='0.0.0.0',
port=8080,
debug=True,
extra_files=[
"./static/stylesheets/style.css"
])
extra_files=extra_files
)
2 changes: 2 additions & 0 deletions python/okteto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ name: vote
image: okteto/vote:latest
workdir: /src
command: ["python", "app.py"]
environment:
- FLASK_ENV=development
forward:
- 8080:8080
16 changes: 10 additions & 6 deletions vscode/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ def hello():


if __name__ == "__main__":
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files = []
if "development" == os.getenv("FLASK_ENV"):
app.jinja_env.auto_reload = True
app.config['TEMPLATES_AUTO_RELOAD'] = True
extra_files=[
"./static/stylesheets/style.css"
]

app.run(
host='0.0.0.0',
port=8080,
debug=True,
extra_files=[
"./static/stylesheets/style.css"
])
extra_files=extra_files
)
2 changes: 2 additions & 0 deletions vscode/okteto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: vote
image: okteto/vote:ssh
workdir: /src
command: [ "sh", "-c", "env > /root/.ssh/environment && cp /etc/ssh-key/* /root/.ssh && /usr/sbin/sshd -D" ]
environment:
- FLASK_ENV=development
forward:
- 8080:8080
- 22000:22

0 comments on commit c2ec0a2

Please sign in to comment.