-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from DiptoChakrabarty/development
Development
- Loading branch information
Showing
11 changed files
with
110 additions
and
14 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,18 @@ | ||
FROM python:3.8 | ||
|
||
ENV FLASK_APP=app.py | ||
|
||
ENV FLASK_RUN_HOST=0.0.0.0 | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
# Install packages | ||
RUN pip3 install -r requirements.txt | ||
|
||
RUN rm site.db | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["python3", "app.py"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
POSTGRES_USER=test | ||
POSTGRES_PASSWORD=password | ||
POSTGRES_HOST=db | ||
POSTGRES_PORT=5432 | ||
POSTGRES_DB=flask_online_store |
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,27 @@ | ||
version: '3.8' | ||
services: | ||
db: | ||
image: postgres:latest | ||
env_file: database.conf | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- ./db_volume:/var/lib/db | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
env_file: | ||
- .env | ||
volumes: | ||
- ./:/app | ||
environment: | ||
FLASK_ENV: development | ||
FLASK_APP: ./app.py | ||
ports: | ||
- 5000:5000 | ||
restart: always | ||
depends_on: | ||
- db | ||
volumes: | ||
data-volume: |
Binary file not shown.
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
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