File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,10 @@ COPY /app/ app/
54
54
COPY /tests/ tests/
55
55
COPY /templates/ templates/
56
56
COPY .env app/
57
- COPY alembic.ini app/
58
- COPY alembic/ app /alembic/
57
+ COPY alembic.ini /panettone/alembic.ini
58
+ COPY / alembic/ /panettone /alembic/
59
59
COPY logging-uvicorn.json /panettone/logging-uvicorn.json
60
+ COPY logging-granian.json /panettone/logging-granian.json
60
61
COPY pyproject.toml /panettone/pyproject.toml
61
62
62
63
RUN python -V
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ services:
3
3
container_name : fsap_app
4
4
network_mode : host
5
5
build : .
6
+ environment :
7
+ - PYTHONPATH=/panettone
6
8
env_file :
7
9
- .env
8
10
- .secrets
Original file line number Diff line number Diff line change 1
1
services :
2
2
app :
3
3
container_name : fsap_app
4
+ network_mode : host
4
5
build : .
6
+ environment :
7
+ - PYTHONPATH=/panettone
5
8
env_file :
6
9
- .env
7
10
- .secrets
8
- command : granian --interface asgi --host 0.0.0.0 --port 8080 --loop uvloop app.main:app --access-log --log-level debug --log-config ./logging-granian.json
11
+ command : bash -c "
12
+ granian --interface asgi
13
+ --host 0.0.0.0 --port 8080
14
+ app.main:app --access-log --log-level debug
15
+ --log-config ./logging-granian.json
16
+ "
9
17
volumes:
10
- - .:/home/code
18
+ - ./app:/panettone/app
19
+ - ./tests:/panettone/tests
20
+ - ./templates:/panettone/templates
11
21
ports:
12
22
- " 8080:8080"
13
23
depends_on :
14
24
- db
15
- - redis
25
+ - inmemory
16
26
17
27
db :
18
28
container_name : fsap_db
29
+ network_mode : host
19
30
build :
20
31
context : ./db
21
32
dockerfile : Dockerfile
@@ -41,6 +52,7 @@ services:
41
52
inmemory :
42
53
image : redis:latest
43
54
container_name : fsap_inmemory
55
+ network_mode : host
44
56
ports :
45
57
- " 6379:6379"
46
58
env_file :
You can’t perform that action at this time.
0 commit comments