Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from t0astt/fix_compose
Browse files Browse the repository at this point in the history
Fix paths and docker-compose
  • Loading branch information
t0astt committed Oct 14, 2021
2 parents e41596f + b83344b commit 77c20b7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ After the service is running, the following endpoints will become available:
their respective total supply values.

## Changelog
1.0.0 - Initial API
* 1.0.1 - Fix paths
* 1.0.0 - Initial API
11 changes: 5 additions & 6 deletions api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
FROM python:3.8.12-alpine3.14 AS builder
WORKDIR /app
ADD ../requirements.txt /app
WORKDIR /api
ADD requirements.txt /api
RUN apk add gcc musl-dev
RUN pip install -r requirements.txt

FROM python:3.8.12-alpine3.14
WORKDIR /app
ADD .. /app
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
CMD ["python3", "-m", "gunicorn", "-b", "0.0.0.0", "--workers=2", "api:create_app()"]
WORKDIR /api
ADD . /api
COPY --from=builder /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"
services:
api:
build: ./api
command: "python3 -m gunicorn -b 0.0.0.0 --workers=2 api:new_app"
command: "python3 -m gunicorn -b 0.0.0.0 --workers=2 --chdir .. api:new_app"
expose:
- 8000
environment:
Expand Down
2 changes: 1 addition & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:1.21-alpine

RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d
COPY nginx.conf /etc/nginx/conf.d/default.conf

0 comments on commit 77c20b7

Please sign in to comment.