-
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
fbcc750
commit c99477c
Showing
3 changed files
with
13 additions
and
7 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,14 +1,13 @@ | ||
version: 'latest' | ||
|
||
services: | ||
postgres-db: | ||
container_name: notespace-postgres-db | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
dockerfile: ./docker/Dockerfile-db | ||
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,8 +1,15 @@ | ||
FROM postgres | ||
|
||
USER postgres | ||
WORKDIR /app | ||
|
||
ENV POSTGRES_USER=admin | ||
ENV POSTGRES_PASSWORD=notespace | ||
ENV POSTGRES_DB=notespace | ||
|
||
COPY sql/create_tables.sql /docker-entrypoint-initdb.d/1_create-schema.sql | ||
|
||
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 | ||
COPY --chown=postgres:postgres ./docker/scripts/wait-for-postgres.sh ./bin/wait-for-postgres.sh | ||
RUN chmod +x ./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