Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions earthly/postgresql/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ postgres-base:

WORKDIR /root

# Install necessary packages
# Install necessary packages
# Expand this list as needed, rather than adding more tools in later containers.
RUN apt-get update && apt-get install -y \
bash \
Expand Down Expand Up @@ -80,7 +80,7 @@ BUILDER:
ARG migrations=./migrations
ARG seed=./seed
ARG refinery_toml=./refinery.toml

FROM +postgres-base

WORKDIR /build
Expand All @@ -91,7 +91,7 @@ BUILDER:
COPY --dir $refinery_toml .

# DOCS - FUNCTION to build the docs, needs to be run INSIDE the BUILDER like so:
#
#
# This function uses SchemaSpy to generate database documentation.
# SchemaSpy creates detailed, Discoverable ER diagrams and schema documentation.
#
Expand All @@ -117,7 +117,7 @@ DOCS:
ARG refinery_toml=./refinery.toml

FROM +postgres-base

USER postgres:postgres
WORKDIR /docs

Expand Down Expand Up @@ -169,7 +169,7 @@ INTEGRATION_TEST_SETUP:


# Build PostgreSQL image.
# REQUIREMENTS:
# REQUIREMENTS:
# * prepare migrations files into the `./migrations` dir
# * prepare seed data files into the `./data` dir (optional)
# * prepare `refinery.toml` file
Expand All @@ -178,6 +178,7 @@ INTEGRATION_TEST_SETUP:
BUILD:
FUNCTION
ARG --required image_name
ARG image_tag=latest

USER postgres:postgres

Expand All @@ -186,6 +187,6 @@ BUILD:
ENTRYPOINT ["/scripts/entry.sh"]

# Push the container...
SAVE IMAGE ${image_name}:latest
SAVE IMAGE ${image_name}:${image_tag}