-
Notifications
You must be signed in to change notification settings - Fork 0
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
61bc37a
commit 77e6332
Showing
3 changed files
with
12 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
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,7 +1,9 @@ | ||
FROM postgres:17.0 | ||
|
||
ARG DB_PASSWORD | ||
|
||
ENV POSTGRES_USER=admin | ||
ENV POSTGRES_PASSWORD=Abc!1234 | ||
ENV POSTGRES_PASSWORD=${DB_PASSWORD} | ||
ENV POSTGRES_DB=testdb | ||
|
||
COPY sql /docker-entrypoint-initdb.d/ |
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,10 +1,10 @@ | ||
IMAGE_NAME=postgresql-container | ||
IMAGE_NAME=ghcr.io/fosouzadev/postgresql-container | ||
TAG=1.0 | ||
|
||
build: | ||
docker build . -t ghcr.io/fosouzadev/$(IMAGE_NAME):$(TAG) | ||
docker build . -t ghcr.io/fosouzadev/$(IMAGE_NAME):latest | ||
docker build --build-arg DB_PASSWORD=$(DB_PASSWORD) . -t $(IMAGE_NAME):$(TAG) | ||
docker build --build-arg DB_PASSWORD=$(DB_PASSWORD) . -t $(IMAGE_NAME):latest | ||
|
||
publish: | ||
docker push ghcr.io/fosouzadev/$(IMAGE_NAME):$(TAG) | ||
docker push ghcr.io/fosouzadev/$(IMAGE_NAME):latest | ||
docker push $(IMAGE_NAME):$(TAG) | ||
docker push $(IMAGE_NAME):latest |