From 68948376b04e65880ebb7017c0f7319160d40675 Mon Sep 17 00:00:00 2001 From: Viet Nguyen <3805254+vnugent@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:25:37 -0800 Subject: [PATCH] chore: remove support for running dev env in Docker (#1229) --- .dockerignore | 3 --- .github/workflows/nodejs.yml | 30 ------------------------------ Dockerfile | 17 ----------------- README.md | 21 --------------------- docker-compose.yml | 23 ----------------------- 5 files changed, 94 deletions(-) delete mode 100644 .dockerignore delete mode 100644 Dockerfile delete mode 100644 docker-compose.yml diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 1b289ac7c..000000000 --- a/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -.cache/ -node_modules/ -public/ \ No newline at end of file diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index aefa37013..95151fe5c 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -47,33 +47,3 @@ jobs: - name: Build project run: yarn build if: ${{ github.event_name != 'pull_request' }} - - test-docker-compose: - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - name: Build the dev container - run: docker-compose build --no-cache --progress plain - env: - SIRV_CLIENT_SECRET_RO: ${{ secrets.SIRV_CLIENT_SECRET_RO }} - SIRV_CLIENT_SECRET_RW: ${{ secrets.SIRV_CLIENT_SECRET_RW }} - NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }} - AUTH0_CLIENT_SECRET: ${$ secrets.AUTH0_CLIENT_SECRET }} - AUTH0_MGMT_CLIENT_SECRET: ${$ secrets.AUTH0_MGMT_CLIENT_SECRET }} - - - name: Start docker compose - run: docker-compose up -d - env: - SIRV_CLIENT_SECRET_RO: ${{ secrets.SIRV_CLIENT_SECRET_RO }} - - - name: Wait for the site to be online - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 180 localhost:3000 -- echo "Site is up" - env: - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 - - - name: Stop containers - if: always() - run: docker-compose down \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 57e087c34..000000000 --- a/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ - -FROM node:18-bullseye-slim as builder - -ENV PATH /app/node_modules/.bin:$PATH - -RUN apt-get update -y && apt-get -y install curl - -# The port next runs on -EXPOSE 3000 -WORKDIR /app - -# Note: -# No COPY commands here. -# For development we don't want a static version of files under src/ -# See docker-compose.yml for local dir --> container mapping. - -CMD ["sh", "-c", "yarn install --network-timeout 300000 && yarn dev"] diff --git a/README.md b/README.md index d51acfee3..0c66d3a08 100644 --- a/README.md +++ b/README.md @@ -93,27 +93,6 @@ yarn dev The application is now available at http://localhost:3000 - -### Alternate build method using Docker - -If you just want to run the app locally without installing node, npm, etc., you can do so with Docker. - -**Requirements:** [Docker](https://docs.docker.com/get-docker/) - -``` -docker compose up -``` - -The application is now available at http://localhost:3000. The project will rebuild automatically when you make changes to files in `./src` dir. - -Note: If you install new NPM packages, you will need to rebuild the docker image with - -``` -docker compose up --build -``` - -The application is now available at `http://localhost:3000` - ## Tips ### API key errors diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index f88c15991..000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: "3.7" -services: - web: - build: - context: . - dockerfile: Dockerfile - image: openbeta/opentacos-dev:latest - container_name: opentacos-dev-latest - volumes: - - ./.cache:/app/.cache - - ./node_modules:/app/node_modules - - ./:/app - ports: - - "3000:3000" - environment: - - NODE_ENV=development - - NEXT_TELEMETRY_DISABLED=1 - healthcheck: - test: curl --fail http://web:3000 || exit 1 - interval: 1m - retries: 30 - start_period: 2m - timeout: 5m