-
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.
- Loading branch information
1 parent
166b7cc
commit f832ff5
Showing
11 changed files
with
268 additions
and
235 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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
build/ | ||
dist/ | ||
poetry.lock | ||
__pycache__/ | ||
target/ | ||
Cargo.lock | ||
.idea/ |
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,12 @@ | ||
[package] | ||
name = "docker-compose-host" | ||
version = "0.1.0" | ||
authors = ["odd <[email protected]>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
serde = "1.0.124" | ||
serde_derive = "1.0.124" | ||
serde_json = "1.0" |
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 @@ | ||
ARG PYTHON_VERSION='3.8' | ||
|
||
FROM python:${PYTHON_VERSION} | ||
|
||
ARG ENV | ||
ENV APP_DIR /var/app | ||
|
||
RUN apt-get update -yqq && apt-get install -yqq gcc | ||
RUN pip install -q --upgrade pip | ||
RUN pip install -q fastapi uvicorn | ||
|
||
WORKDIR ${APP_DIR} | ||
COPY ./ ${APP_DIR} | ||
|
||
EXPOSE 8000 | ||
ENTRYPOINT ["uvicorn"] | ||
CMD ["main: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,8 @@ | ||
from fastapi import FastAPI | ||
|
||
app = FastAPI() | ||
|
||
|
||
@app.get('/') | ||
def hello() -> str: | ||
return 'hello' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
services: | ||
api: | ||
build: ./api | ||
command: ["--reload", "--host", "0.0.0.0", "main:app"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.