File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 1
1
services :
2
+
2
3
db :
3
4
image : postgres:13-alpine
4
- container_name : codebuilder-db
5
- environment :
6
- POSTGRES_USER : ${DB_USER:-nestjs}
7
- POSTGRES_PASSWORD : ${DB_PASSWORD:-nestpass}
8
- POSTGRES_DB : ${DB_NAME:-nestdb}
5
+ container_name : codebuilder-postgres-db
6
+ restart : unless-stopped
7
+ env_file :
8
+ - ./.env
9
9
volumes :
10
10
- codebuilder-db-data:/var/lib/postgresql/data
11
11
networks :
12
12
- codebuilder-net
13
+ ports :
14
+ - " 5434:5432"
15
+
13
16
14
17
api :
15
18
build :
16
19
context : .
17
20
dockerfile : Dockerfile
18
21
container_name : codebuilder-api
19
- environment :
20
- DB_HOST : db
21
- DB_PORT : 5432
22
- DB_USER : ${DB_USER:-nestjs}
23
- DB_PASSWORD : ${DB_PASSWORD:-nestpass}
24
- DB_NAME : ${DB_NAME:-nestdb}
25
- PORT : 4000
22
+ restart : unless-stopped
23
+ env_file :
24
+ - ./.env
26
25
ports :
27
26
- " 4000:4000"
28
27
depends_on :
@@ -32,9 +31,11 @@ services:
32
31
- codebuilder-net
33
32
34
33
34
+
35
35
volumes :
36
36
codebuilder-db-data :
37
37
38
+
38
39
networks :
39
40
codebuilder-net :
40
41
external : true
You can’t perform that action at this time.
0 commit comments