Commit 3e2720f0 authored by Ai-Sasit's avatar Ai-Sasit

fix

parent 6285fdaa
......@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY ./server /code/server
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0"]
CMD ["uvicorn", "server.core:app", "--host", "0.0.0.0", "--port", "5000"]
......@@ -3,13 +3,9 @@ version: "3"
services:
server:
container_name: easybistro-api
restart: always
build: .
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
ports:
- "5000:80"
depends_on:
- mongodb
......@@ -21,16 +17,3 @@ services:
environment:
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:
[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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment