Skip to content

Commit 5bb10f0

Browse files
HAN-54-deploy-(#2)
1 parent 0ffd21b commit 5bb10f0

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

.env.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
LOGGING_LEVEL=
2+
PORT=
23
USERS_HOST=
34
MEASUREMENTS_HOST=
45
PLANTS_HOST=

.github/workflows/linters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v3
10-
- name: Set up Python ${{ matrix.python-version }}
10+
- name: Set up Python 3.8
1111
uses: actions/setup-python@v3
1212
with:
13-
python-version: ${{ matrix.python-version }}
13+
python-version: 3.8
1414
- name: Install dependencies
1515
run: |
1616
python -m pip install --upgrade pip

Dockerfile.prod

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.11-slim-buster
2+
WORKDIR /src
3+
4+
COPY . /src
5+
6+
RUN pip install -r requirements.txt
7+
8+
EXPOSE 5000
9+
10+
COPY ./entrypoint-heroku.sh .
11+
12+
RUN chmod +x ./entrypoint-heroku.sh
13+
14+
CMD ["./entrypoint-heroku.sh"]

entrypoint-heroku.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
gunicorn wsgi:app -b 0.0.0.0:${PORT}

heroku.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
docker:
3+
web: Dockerfile.prod

0 commit comments

Comments
 (0)