init routing, init db connection

This commit is contained in:
valitovgaziz
2024-08-04 23:28:09 +05:00
parent c13d5a8ee8
commit 2669e0be51
7 changed files with 202 additions and 27 deletions
+16 -16
View File
@@ -1,17 +1,17 @@
services:
# db:
# image: postgres:16
# env_file:
# - .env
# environment:
# - POSTGRES_USER=${DB_USER}
# - POSTGRES_PASSWORD=${DB_PASSWORD}
# - POSTGRES_DB=${DB_NAME}
# ports:
# - "${DB_PORT}:${DB_PORT}"
# volumes:
# - postgres-db:/var/lib/postgresql/data
db:
image: postgres:16
env_file:
- .env
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- postgres-db:/var/lib/postgresql/data
api:
@@ -24,8 +24,8 @@ services:
- "${SERVER_PORT}:${SERVER_PORT}"
volumes:
- .:/usr/src/app
# depends_on:
# - db
depends_on:
- db
# volumes:
# postgres-db:
volumes:
postgres-db: