Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
easybistro-api-docker
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sasit Wiratjinda
easybistro-api-docker
Commits
6285fdaa
Commit
6285fdaa
authored
Nov 25, 2022
by
Ai-Sasit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8031c7cd
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
72 deletions
+46
-72
Dockerfile
Dockerfile
+1
-4
cert.pem
cert.pem
+0
-26
docker-compose.yml
docker-compose.yml
+19
-3
key.pem
key.pem
+0
-28
main.py
main.py
+2
-2
traefik.toml
traefik.toml
+24
-0
vercel.json
vercel.json
+0
-9
No files found.
Dockerfile
View file @
6285fdaa
...
...
@@ -8,7 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY
./server /code/server
# COPY key.pem /code
# COPY cert.pem /code
CMD
["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "80"]
CMD
["uvicorn", "server.core:app", "--host", "0.0.0.0"]
cert.pem
deleted
100644 → 0
View file @
8031c7cd
-----BEGIN CERTIFICATE-----
MIIEZjCCAs6gAwIBAgIRAOkAp8lYhzHfxivVTgxnUNswDQYJKoZIhvcNAQELBQAw
gZExHjAcBgNVBAoTFW1rY2VydCBkZXZlbG9wbWVudCBDQTEzMDEGA1UECwwqQUkt
U0FTSVRcc2FzaXRAQWktU2FzaXQgKFNhc2l0IFdpcmF0amluZGEpMTowOAYDVQQD
DDFta2NlcnQgQUktU0FTSVRcc2FzaXRAQWktU2Fza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nasfGx6Z0UwT8rNpcNx+zLW6kFmNzG2Tg/lF5AnuUGagN2syxDm9Apo
BE1JT1Rhg9yu1uIluqkkDoX+iHR5+v1Kp1CGtTmXy4yAfzSprFYVrxIw7Mbf9rI2
uJ7qBIxmaI+APGwTVBONsHvNUj6Qh9TmnRgFUURnOtCMy42hX6fMcmHmhHVLkwYX
t/4mw2UiYJbHlmdoT96DeV2rMQyaq6PJFlQ=
-----END CERTIFICATE-----
docker-compose.yml
View file @
6285fdaa
version
:
'
3'
version
:
"
3"
services
:
server
:
container_name
:
easybistro-api
restart
:
always
build
:
.
ports
:
-
"
5000:80"
labels
:
-
traefik.enable=true
-
traefik.http.routers.app-http.rule=Host(`ec2-13-212-117-20.ap-southeast-1.compute.amazonaws.com`)
-
traefik.http.routers.app-http.tls=true
-
traefik.http.routers.app-http.tls.certresolver=letsencrypt
depends_on
:
-
mongodb
...
...
@@ -18,3 +22,15 @@ services:
MONGO_INITDB_ROOT_USERNAME
:
easybistro
MONGO_INITDB_ROOT_PASSWORD
:
xejP3257
traefik
:
image
:
traefik:latest
ports
:
-
80:80
-
443:443
restart
:
always
volumes
:
-
/var/run/docker.sock:/var/run/docker.sock:ro
-
$PWD/traefik.toml:/etc/traefik/traefik.toml
-
traefik-public-certificates:/certificates
volumes
:
traefik-public-certificates
:
key.pem
deleted
100644 → 0
View file @
8031c7cd
-----BEGIN PRIVATE KEY-----
MIIEuwIBADANBgkqhkiG9w0BAQEFAASCBKUwggShAgEAAoIBAQC5AJdecevyMdXt
NFPBxl6koNO+hItfQbjDwRIRfjSFWBiDDpfZHmQUe3a0EBCq4FLz+M/boPU2JtrB
NJFWag7KOvD4Si2UlY7jTECa05i2CybNWNej+qUc3o1t4nNnTFYpRJNf1kD0erJF
Hfha3RRLIaTBqItU8SuSeBSFx0YGLrxfiAEl8CcsCxq+Mo3KjZwUcq7wJIEfHzrK
8+Vgr9nzNChljmMaIBtU1b3lrTvvCEdNRcCzmtVSgdcLs8s0e14q9ciJx4l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Mb/pxMe5z3EBnAc6hwvFM/5IXHpb8xk3s
fI0JIxOELTP1RN/2nVmvqYNu46HY2FiY+etpAoGBAKEh1VscLC+MK+81zZfr+nws
Wx/mf455HIFdlJhJQH5FQfz/tArDiVH5U1HNmggL9OkyzDW6VwdQbpittJBQCdQ2
OK86MsCfPjpfz1bv8B/w35jMFy0nLZcF2/WQ33aEI8vvSXCMKVpdS4C0BdgawYQi
JUicRgJ7O0S7FlQwqGic
-----END PRIVATE KEY-----
main.py
View file @
6285fdaa
import
uvicorn
if
__name__
==
"__main__"
:
uvicorn
.
run
(
"server.core:app"
,
host
=
"0.0.0.0"
,
port
=
8000
,
reload
=
True
)
\ No newline at end of file
uvicorn
.
run
(
"server.core:app"
,
host
=
"0.0.0.0"
,
reload
=
True
)
\ No newline at end of file
traefik.toml
0 → 100644
View file @
6285fdaa
[entryPoints]
[entryPoints.web]
address
=
":80"
[entryPoints.web.http]
[entryPoints.web.http.redirections]
[entryPoints.web.http.redirections.entryPoint]
to
=
"websecure"
scheme
=
"https"
[entryPoints.websecure]
address
=
":443"
[accessLog]
[providers]
[providers.docker]
exposedByDefault
=
false
[certificatesResolvers.letsencrypt.acme]
email
=
"sasit.wi.62@ubu.ac.th"
storage
=
"acme.json"
[certificatesResolvers.letsencrypt.acme.httpChallenge]
entryPoint
=
"web"
\ No newline at end of file
vercel.json
deleted
100644 → 0
View file @
8031c7cd
{
"builds"
:
[
{
"src"
:
"/server/core.py"
,
"use"
:
"@vercel/python"
}
],
"routes"
:
[
{
"src"
:
"/(.*)"
,
"dest"
:
"server/core.py"
}
]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment