Skip to content

Commit f405692

Browse files
committed
hmm?
1 parent 3c0c652 commit f405692

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

backend/db/data-source.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const typeOrmAsyncConfig: TypeOrmModuleAsyncOptions = {
2525
useFactory: async (
2626
configService: ConfigService,
2727
): Promise<TypeOrmModuleOptions> => {
28-
console.log(configService.get<DatabseUnion>('dbDatabase'));
2928
return {
3029
type: configService.get<DatabseUnion>('dbDatabase'),
3130
host: configService.get<string>('dbHost'),
@@ -34,6 +33,7 @@ export const typeOrmAsyncConfig: TypeOrmModuleAsyncOptions = {
3433
database: configService.get<string>('dbName'),
3534
password: configService.get<string>('dbPassword'),
3635
entities: ['dist/**/*.entity.{js, ts}'],
36+
// autoLoadEntities: true,
3737
synchronize: true,
3838
};
3939
},

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '1.0'
1+
version: '3.8'
22

33
services:
44
postgres:
@@ -14,7 +14,7 @@ services:
1414
- "${DB_PORT}:5432"
1515
volumes:
1616
- pg_data:/var/lib/postgresql/data/
17-
# - ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
17+
- ./docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
1818
networks:
1919
- bp-network
2020
env_file:

docker_postgres_init.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CREATE DATABASE 'smartphone-shop'
2+
WITH
3+
OWNER = postgres
4+
ENCODING = 'UTF8'
5+
LC_COLLATE = 'en_US.utf8'
6+
LC_CTYPE = 'en_US.utf8'
7+
TABLESPACE = pg_default
8+
CONNECTION LIMIT = -1;

0 commit comments

Comments
 (0)