Skip to content

Commit a90f09b

Browse files
committed
fix ecr auth
1 parent 233c956 commit a90f09b

2 files changed

Lines changed: 13 additions & 38 deletions

File tree

.github/workflows/docker-image-prod.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ jobs:
6464
file: docker-builds/server/Dockerfile
6565
build-args: BUILD_ENV=${{ matrix.env }}
6666
push: true
67-
tags: ${{ secrets.ETHLANCE_PROD_ECR_PREFIX }}/ethlance-${{ matrix.env }}-server:${{ github.sha }}, ${{ secrets.ETHLANCE_PROD_ECR_PREFIX }}/ethlance-${{ matrix.env }}-server:latest
67+
tags: ${{ secrets.ECR_REGISTRY }}/ethlance-${{ matrix.env }}-server:${{ github.sha }}, ${{ secrets.ECR_REGISTRY }}/ethlance-${{ matrix.env }}-server:latest
6868

69-
# - name: Build and push UI
70-
# uses: docker/build-push-action@v6
71-
# with:
72-
# context: .
73-
# platforms: linux/amd64
74-
# builder: ${{ steps.setup-buildx.outputs.name }}
75-
# file: docker-builds/ui/Dockerfile
76-
# build-args: BUILD_ENV=${{ matrix.env }}
77-
# push: true
78-
# tags: ${{ secrets.ETHLANCE_PROD_ECR_PREFIX }}/ethlance-${{ matrix.env }}-ui:${{ github.sha }}, ${{ secrets.ETHLANCE_PROD_ECR_PREFIX }}/ethlance-${{ matrix.env }}-server:latest
69+
- name: Build and push UI
70+
uses: docker/build-push-action@v6
71+
with:
72+
context: .
73+
platforms: linux/amd64
74+
builder: ${{ steps.setup-buildx.outputs.name }}
75+
file: docker-builds/ui/Dockerfile
76+
build-args: BUILD_ENV=${{ matrix.env }}
77+
push: true
78+
tags: ${{ secrets.ECR_REGISTRY }}/ethlance-${{ matrix.env }}-ui:${{ github.sha }}, ${{ secrets.ECR_REGISTRY }}/ethlance-${{ matrix.env }}-server:latest

docker-builds/server/Dockerfile

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ ENV ETHLANCE_SERVER_ROOT=${ETHLANCE_SOURCE_ROOT}/server \
1515
WORKDIR ${ETHLANCE_SOURCE_ROOT}
1616
COPY . .
1717

18-
RUN ls -lah
19-
RUN cat "${SMART_CONTRACTS_PATH}"
20-
21-
# # WORKDIR /build/ethlance-config/
22-
# # COPY ethlance-config .
23-
2418
# # WORKDIR /build
2519
COPY ethlance-config/config "${ETHLANCE_SOURCE_ROOT}/config"
2620

@@ -42,35 +36,16 @@ RUN yarn && npx shadow-cljs release dev-server
4236

4337
# Final stage - minimal runtime image
4438
FROM node:20-slim
45-
# # ENV ETHLANCE_ENV=prod \
46-
# # ETHLANCE_SOURCE_ROOT=/build/ethlance \
47-
# # ETHLANCE_SERVER_ROOT=${ETHLANCE_SOURCE_ROOT}/server \
48-
# # UI_CONFIG_PATH="${ETHLANCE_SOURCE_ROOT}/config/ui-config-${ETHLANCE_ENV}.edn" \
49-
# # ETHLANCE_CONFIG_PATH="${ETHLANCE_SOURCE_ROOT}/config/server-config-${ETHLANCE_ENV}.edn"
50-
51-
# # WORKDIR "${ETHLANCE_SERVER_ROOT}"
52-
# # COPY --from=builder /build /build
53-
# # # COPY --from=build_server /build/ethlance/config/ui-config-${ETHLANCE_ENV}.edn /deploy/resources/config/ui-config-${ETHLANCE_ENV}.edn
54-
# # # COPY --from=build_server /build/ethlance/config/server-config-${ETHLANCE_ENV}.edn /deploy/resources/config/server-config-${ETHLANCE_ENV}.edn
55-
# # # COPY --from=build_server /build/ethlance/resources /deploy/resources
56-
# # # COPY --from=build_server /build/ethlance/server/node_modules /deploy/server/node_modules/
57-
# # # COPY --from=build_server /build/ethlance/server/package.json /build/ethlance/server/out/ethlance_server* /deploy/server/
58-
# # # COPY --from=build_server /build/ethlance/resources/public/contracts /deploy/ui/contracts/
59-
# # # COPY --from=build_server /build/ethlance/ui/resources/public/* /deploy/ui/
60-
# # RUN echo -n "{:last-processed-block 27409455}" > ethlance-events.log
61-
# # CMD [ "node", "out/ethlance_server.js" ]
62-
6339
ENV ETHLANCE_ENV=prod \
64-
ETHLANCE_SOURCE_ROOT=/build/ethlance \
65-
ETHLANCE_SERVER_ROOT=/build/ethlance/server \
40+
ETHLANCE_SOURCE_ROOT=/build/ethlance
41+
ENV ETHLANCE_SERVER_ROOT=/build/ethlance/server \
6642
SMART_CONTRACTS_BUILD_PATH="${ETHLANCE_SOURCE_ROOT}/resources/public/contracts/build" \
6743
SMART_CONTRACTS_PATH="${ETHLANCE_SOURCE_ROOT}/shared/src/ethlance/shared/smart_contracts_${ETHLANCE_ENV}.cljs" \
6844
UI_CONFIG_PATH="/build/ethlance/config/ui-config-prod.edn" \
6945
ETHLANCE_CONFIG_PATH="/build/ethlance/config/server-config-prod.edn"
7046

7147
WORKDIR ${ETHLANCE_SERVER_ROOT}
7248

73-
# Only copy what's needed for runtime
7449
COPY --from=builder /build /build
7550
# COPY --from=builder /build/ethlance/config/ui-config-prod.edn /build/ethlance/config/ui-config-prod.edn
7651
# COPY --from=builder /build/ethlance/config/server-config-prod.edn /build/ethlance/config/server-config-prod.edn

0 commit comments

Comments
 (0)