-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
9 changed files
with
137 additions
and
19 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,10 @@ | ||
venv | ||
instance | ||
docs | ||
microcontroller | ||
migrations | ||
node_modules | ||
tests | ||
package.json | ||
package-lock.json | ||
serverless.yml |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
venv | ||
node_modules | ||
.env | ||
db.env | ||
|
||
application/.env | ||
serverless.yml | ||
|
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,20 @@ | ||
FROM python:3.9-buster | ||
|
||
RUN mkdir app | ||
WORKDIR /app | ||
|
||
ENV PATH="${PATH}:/root/.local/bin" | ||
ENV PYTHONPATH=. | ||
|
||
|
||
EXPOSE 8000 | ||
COPY requirements.txt . | ||
|
||
|
||
RUN pip3 install --upgrade pip | ||
RUN pip3 install -r requirements.txt | ||
|
||
COPY . . | ||
|
||
#CMD python3 app.py | ||
CMD ["gunicorn" , "--bind", "0.0.0.0:8000", "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,34 @@ | ||
version: '3.8' | ||
|
||
services: | ||
|
||
db: | ||
image: postgres:13-alpine | ||
container_name: playgrounddb | ||
ports: | ||
- "5432:5432" | ||
env_file: | ||
- db.env | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data/ | ||
|
||
app: | ||
build: . | ||
image: playgroundapp | ||
env_file: | ||
- .env | ||
depends_on: | ||
- db | ||
|
||
nginx: | ||
build: ./nginx | ||
image: playgroundnginx | ||
container_name: playgroundnginx | ||
ports: | ||
- 80:80 | ||
depends_on: | ||
- app | ||
- db | ||
|
||
volumes: | ||
postgres_data: |
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,4 @@ | ||
FROM nginx:latest | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
#COPY nginx.conf /etc/nginx/conf.d/ | ||
COPY nginx.conf /etc/nginx/nginx.conf |
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 @@ | ||
# App service scaled | ||
events {} | ||
|
||
http { | ||
upstream app { | ||
server app; | ||
server serverless-flask-app-1:8000; | ||
server serverless-flask-app-2:8000; | ||
} | ||
server { | ||
listen 80; | ||
server_name app.com; | ||
location / { | ||
proxy_pass http://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
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
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