-
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.
Merge pull request #3 from MiqSA/1-setup-application
Add initial setup
- Loading branch information
Showing
15 changed files
with
562 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,7 @@ | ||
FROM python:3.10 | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
ENV PYTHONUNBUFFERED=1 | ||
WORKDIR /usr/app | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
CMD ["python", "server.py"] |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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 @@ | ||
Flask |
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,9 @@ | ||
from flask import Flask | ||
server = Flask(__name__) | ||
|
||
@server.route("/") | ||
def hello(): | ||
return { "hello": "world!" } | ||
|
||
if __name__ == "__main__": | ||
server.run(host='0.0.0.0', port='8000') |
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,6 @@ | ||
CREATE TABLE data ( | ||
id int(11) not null primary key auto_increment, | ||
url varchar(255) not null, | ||
title varchar(100) not null, | ||
date_added datetime not null | ||
) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
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.9" | ||
|
||
services: | ||
app: | ||
build: | ||
context: "./app" | ||
env_file: .env | ||
volumes: | ||
- ./app/:/usr/app/ | ||
depends_on: | ||
- database | ||
ports: | ||
- "8082:8000" | ||
networks: | ||
- production-network | ||
expose: | ||
- 8000 | ||
database: | ||
image: mysql | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: v25xhycLlRY3sV7Z | ||
MYSQL_DATABASE: "exercise" | ||
volumes: | ||
- ./database/initdb.d:/docker-entrypoint-initdb.d | ||
networks: | ||
- production-network | ||
ports: | ||
- "3306:3306" | ||
expose: | ||
- 3306 | ||
networks: | ||
production-network: | ||
driver: bridge |
Oops, something went wrong.