File tree 3 files changed +19
-31
lines changed 3 files changed +19
-31
lines changed Original file line number Diff line number Diff line change @@ -4,24 +4,18 @@ services:
4
4
container_name : appseed_app
5
5
restart : always
6
6
working_dir : /usr/src/app
7
- build : .
8
7
ports :
9
- - 8000:8000
8
+ - ' 8000:8000'
9
+ env_file :
10
+ - .env
11
+ build : .
10
12
volumes :
11
13
- ./:/usr/app/src
12
- environment :
13
- - DATABASE_HOSTNAME=hostname
14
- - DATABASE_PORT=5432
15
- - DATABASE_PASSWORD=password123
16
- - DATABASE_NAME=database_name
17
- - DATABASE_USERNAME=nonrootuser
18
- - SECRET_KEY=somesecretkey
19
- - ALGORITHM=HS256
20
- - ACCESS_TOKEN_EXPIRE_MINUTES=30
21
- - DEBUGGING=0
22
- command : uvicorn src.app:app --host 0.0.0.0 --port 8000
14
+
15
+ command : uvicorn src.app:app --host 0.0.0.0 --port 5085
23
16
depends_on :
24
17
- db
18
+
25
19
db :
26
20
image : mysql:5.7
27
21
restart : always
@@ -31,9 +25,9 @@ services:
31
25
MYSQL_PASSWORD : ' password'
32
26
MYSQL_ROOT_PASSWORD : ' password'
33
27
ports :
34
- - ' 5432:5432 '
28
+ - ' 3306:3306 '
35
29
expose :
36
- - ' 5432 '
30
+ - ' 3306 '
37
31
volumes :
38
32
- my-db:/var/lib/mysql
39
33
volumes :
Original file line number Diff line number Diff line change @@ -4,22 +4,10 @@ services:
4
4
container_name : appseed_app
5
5
restart : always
6
6
working_dir : /usr/src/app
7
+ env_file :
8
+ - .env
7
9
build : .
8
- ports :
9
- - 8000:8000
10
- volumes :
11
- - ./:/usr/app/src
12
- environment :
13
- - DATABASE_HOSTNAME=hostname
14
- - DATABASE_PORT=5432
15
- - DATABASE_PASSWORD=password123
16
- - DATABASE_NAME=database_name
17
- - DATABASE_USERNAME=root
18
- - SECRET_KEY=somesecretkey
19
- - ALGORITHM=HS256
20
- - ACCESS_TOKEN_EXPIRE_MINUTES=30
21
- - DEBUGGING=1
22
- command : uvicorn src.app:app --host 0.0.0.0 --port 8000 --reload
10
+ command : uvicorn src.app:app --host 0.0.0.0 --reload
23
11
nginx :
24
12
container_name : nginx
25
13
restart : always
@@ -31,4 +19,10 @@ services:
31
19
# networks:
32
20
# - web_network
33
21
depends_on :
34
- - appseed-app
22
+ - appseed-app
23
+ networks :
24
+ db_network :
25
+ driver : bridge
26
+ web_network :
27
+ driver : bridge
28
+
You can’t perform that action at this time.
0 commit comments