Skip to content

Commit

Permalink
Remove s3 creds from frontend container (#81)
Browse files Browse the repository at this point in the history
* Remove s3 creds from frontend container

* Skip env validation

---------

Co-authored-by: Luccas Mateus <luccasmmg@gmail.com>
  • Loading branch information
MuhammadIsmailShahzad and luccasmmg authored Nov 9, 2023
1 parent 9697477 commit e9a44ce
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ jobs:
--build-arg NEXTAUTH_SECRET=${{ secrets.DEV_FRONTEND_NEXTAUTH_SECRET }} \
--build-arg NEXTAUTH_URL=${{ secrets.DEV_FRONTEND_NEXTAUTH_URL }} \
--build-arg CKAN_URL=${{ secrets.DEV_FRONTEND_CKAN_URL }} \
--build-arg S3_ACCESS_KEY_ID=${{ secrets.DEV_S3_ACCESS_KEY_ID }} \
--build-arg S3_SECRET_KEY_ID=${{ secrets.DEV_S3_SECRET_KEY_ID }} \
--build-arg S3_BUCKET_NAME=${{ secrets.DEV_S3_BUCKET_NAME }} \
--build-arg S3_BUCKET_REGION=${{ secrets.DEV_S3_BUCKET_REGION }} \
deployment/frontend
docker push $REGISTRY/$FRONTEND_REPO:$IMAGE_TAG
- name: Set up Docker Containers
Expand All @@ -64,10 +60,6 @@ jobs:
MINIO_ROOT_PASSWORD: 'minioadmin'
run: docker compose -f docker-compose.test.yml --env-file .env.example up --build -d
working-directory: ./ckan-backend-dev
- name: Print Container names
run: docker ps -a
- name: Print logs
run: docker logs wri-frontend
- name: Cypress Install and CKAN setup
uses: cypress-io/github-action@v6
with:
Expand Down
4 changes: 0 additions & 4 deletions ckan-backend-dev/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ services:
- NEXTAUTH_SECRET=secret
- NEXTAUTH_URL=http://localhost:3000
- CKAN_URL=http://ckan-dev:5000
- S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}
- S3_SECRET_KEY_ID=${MINIO_ROOT_PASSWORD}
- S3_BUCKET_NAME=ckan
- S3_BUCKET_REGION=us-east-1
environment:
- NEXTAUTH_SECRET=secret
- NEXTAUTH_URL=http://localhost:3000
Expand Down
6 changes: 1 addition & 5 deletions deployment/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ WORKDIR /usr/src/app
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG CKAN_URL
ARG S3_ACCESS_KEY_ID
ARG S3_SECRET_KEY_ID
ARG S3_BUCKET_NAME
ARG S3_BUCKET_REGION

COPY . .

# You can setup env vars here or via `.env` file

RUN npm ci -f
RUN npm run build
RUN SKIP_ENV_VALIDATION=1 npm run build
EXPOSE 3000

# For staging/production please use `yarn start` command.
Expand Down

0 comments on commit e9a44ce

Please sign in to comment.