Skip to content

Commit cc7f603

Browse files
committed
fix: add env paths and correct postgress image
1 parent 04d4677 commit cc7f603

File tree

2 files changed

+9
-17
lines changed

2 files changed

+9
-17
lines changed

Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
version: '3.8'
22
services:
33
db:
4-
container_name: postgres
5-
image: postgis/postgis:15-3.3
4+
container_name: code-racer-postgres
5+
image: postgres:15-bullseye
66
restart: always
77
environment:
8-
- POSTGRES_USER=postgres
9-
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
8+
- POSTGRES_USER=${DATABASE_USERNAME}
9+
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
10+
- POSTGRES_DB=${DATABASE_NAME}
11+
env_file:
12+
- .env
1013
ports:
11-
- '5432:5432'
14+
- ${DATABASE_PORT}:${DATABASE_PORT}
1215
volumes:
1316
- db:/var/lib/postgresql/data
17+
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql
1418
volumes:
1519
db:
1620
driver: local

0 commit comments

Comments
 (0)