Skip to content

Commit

Permalink
Reapply "[⚠️] Clean up discovery node build artifacts and URSM code (#…
Browse files Browse the repository at this point in the history
…8234)"

This reverts commit 3c6d4f4.
  • Loading branch information
sliptype committed May 2, 2024
1 parent 3c6d4f4 commit fda21ff
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 1,311 deletions.
1 change: 0 additions & 1 deletion dev-tools/compose/docker-compose.discovery.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ services:
audius_discprov_dev_mode: 'true'
audius_discprov_loglevel: 'debug'
volumes:
- ${PROJECT_ROOT}/packages/discovery-provider/alembic:/audius-discovery-provider/alembic
- ${PROJECT_ROOT}/packages/discovery-provider/src:/audius-discovery-provider/src
- ${PROJECT_ROOT}/dev-tools:/tmp/dev-tools
healthcheck:
Expand Down
13 changes: 0 additions & 13 deletions packages/discovery-provider/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# Pretty much the same as the Dockerfile.prod but assumes the whole
# discovery-provider package is a mounted volume instead of copying everything.
FROM audius/contracts:1.0.0 AS contracts
FROM alpine:3.18

WORKDIR /app/packages/discovery-provider

ENV PROMETHEUS_MULTIPROC_DIR /prometheus_data
RUN mkdir -p ${PROMETHEUS_MULTIPROC_DIR}

# Add the wait script to the image
# Script originally from https://github.com/ufoscout/docker-compose-wait/releases/download/2.4.0/wait
COPY scripts/wait /wait
Expand Down Expand Up @@ -67,8 +63,6 @@ RUN python3 -m pip install --upgrade pip
COPY scripts/init-db.sh scripts/init-db.sh
RUN bash scripts/init-db.sh

COPY --from=contracts /usr/src/app/build/contracts/ build/contracts/

COPY requirements.txt requirements.txt
RUN --mount=type=cache,target=/root/.cache \
python3 -m pip install -r requirements.txt --no-cache-dir
Expand All @@ -77,14 +71,7 @@ COPY nginx_conf /usr/local/openresty/conf/

# ARGs can be optionally defined with --build-arg while doing docker build eg in CI and then set to env vars
ARG git_sha
ARG audius_loggly_disable
ARG audius_loggly_token
ARG audius_loggly_tags

ENV GIT_SHA=$git_sha
ENV audius_loggly_disable=$audius_loggly_disable
ENV audius_loggly_token=$audius_loggly_token
ENV audius_loggly_tags=$audius_loggly_tags

EXPOSE 5000

Expand Down
11 changes: 0 additions & 11 deletions packages/discovery-provider/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FROM audius/contracts:1.0.0 AS contracts
FROM alpine:3.18

ENV INSTALL_PATH /audius-discovery-provider
Expand Down Expand Up @@ -65,8 +64,6 @@ RUN python3 -m pip install --upgrade pip
COPY scripts/init-db.sh scripts/init-db.sh
RUN bash scripts/init-db.sh

COPY --from=contracts /usr/src/app/build/contracts/ build/contracts/

COPY requirements.txt requirements.txt
RUN --mount=type=cache,target=/root/.cache \
python3 -m pip install -r requirements.txt --no-cache-dir
Expand All @@ -75,16 +72,8 @@ COPY . .

COPY nginx_conf /usr/local/openresty/conf/

# ARGs can be optionally defined with --build-arg while doing docker build eg in CI and then set to env vars
ARG git_sha
ARG audius_loggly_disable
ARG audius_loggly_token
ARG audius_loggly_tags

ENV GIT_SHA=$git_sha
ENV audius_loggly_disable=$audius_loggly_disable
ENV audius_loggly_token=$audius_loggly_token
ENV audius_loggly_tags=$audius_loggly_tags

EXPOSE 5000

Expand Down
Loading

0 comments on commit fda21ff

Please sign in to comment.