-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb7b2db
commit fbcc750
Showing
3 changed files
with
7 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
version: 'latest' | ||
|
||
services: | ||
postgres-db: | ||
container_name: notespace-postgres-db | ||
build: | ||
context: . | ||
dockerfile: ./docker/Dockerfile-db | ||
dockerfile: Dockerfile | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_DB: ${POSTGRES_DB} | ||
ports: | ||
- 5432:5432 | ||
- "5432:5432" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
FROM postgres | ||
|
||
USER postgres | ||
WORKDIR /app | ||
|
||
ENV POSTGRES_USER=${POSTGRES_USER} | ||
ENV POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
ENV POSTGRES_DB=${POSTGRES_DB} | ||
|
||
COPY sql/create_tables.sql /docker-entrypoint-initdb.d/1_create-schema.sql | ||
|
||
COPY --chown=postgres:postgres ./docker/scripts/wait-for-postgres.sh ./bin/wait-for-postgres.sh | ||
RUN chmod +x ./bin/wait-for-postgres.sh | ||
COPY --chown=postgres:postgres ./docker/scripts/wait-for-postgres.sh /usr/local/bin/wait-for-postgres.sh | ||
RUN chmod +x /usr/local/bin/wait-for-postgres.sh | ||
|
||
EXPOSE 5432 | ||
EXPOSE 5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters