Skip to content

Commit a7d820b

Browse files
committed
add environment key db || edit container name
1 parent a3940d1 commit a7d820b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ COMPOSE_PROJECT_NAME=docker
22
COMPOSE_PROJECT_NETWORK=173.2.0
33
COMPOSE_USER_NAME=$USER
44
COMPOSE_USER_UID=1000
5+
DB_DATABASE=my
6+
DB_PASSWORD=my
7+
DB_USERNAME=my

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ services:
3131
default:
3232
ipv4_address: ${COMPOSE_PROJECT_NETWORK}.3
3333
postgres:
34-
container_name: postgres_dental
34+
container_name: postgres_${COMPOSE_PROJECT_NAME}
3535
image: postgres:14.5-alpine
3636
restart: unless-stopped
3737
environment:
@@ -49,7 +49,7 @@ services:
4949
default:
5050
ipv4_address: ${COMPOSE_PROJECT_NETWORK}.4
5151
redis:
52-
container_name: redis
52+
container_name: redis_${COMPOSE_PROJECT_NAME}
5353
image: redis:alpine
5454
# restart: always
5555
# ports:

0 commit comments

Comments
 (0)