Skip to content

Commit 2019068

Browse files
docker files update
1 parent 5b617cf commit 2019068

File tree

3 files changed

+19
-31
lines changed

3 files changed

+19
-31
lines changed

docker-compose-prod.yaml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,18 @@ services:
44
container_name: appseed_app
55
restart: always
66
working_dir: /usr/src/app
7-
build: .
87
ports:
9-
- 8000:8000
8+
- '8000:8000'
9+
env_file:
10+
- .env
11+
build: .
1012
volumes:
1113
- ./:/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
2316
depends_on:
2417
- db
18+
2519
db:
2620
image: mysql:5.7
2721
restart: always
@@ -31,9 +25,9 @@ services:
3125
MYSQL_PASSWORD: 'password'
3226
MYSQL_ROOT_PASSWORD: 'password'
3327
ports:
34-
- '5432:5432'
28+
- '3306:3306'
3529
expose:
36-
- '5432'
30+
- '3306'
3731
volumes:
3832
- my-db:/var/lib/mysql
3933
volumes:

docker-compose.yaml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,10 @@ services:
44
container_name: appseed_app
55
restart: always
66
working_dir: /usr/src/app
7+
env_file:
8+
- .env
79
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
2311
nginx:
2412
container_name: nginx
2513
restart: always
@@ -31,4 +19,10 @@ services:
3119
# networks:
3220
# - web_network
3321
depends_on:
34-
- appseed-app
22+
- appseed-app
23+
networks:
24+
db_network:
25+
driver: bridge
26+
web_network:
27+
driver: bridge
28+

src/sql_app.db

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)