From 85897096c6a0c469766c45c468b4436e6ca8448d Mon Sep 17 00:00:00 2001 From: Aryan Kothari <87589047+thearyadev@users.noreply.github.com> Date: Sun, 21 Jan 2024 18:27:04 +0000 Subject: [PATCH] Delete docker-files --- Dockerfile.frontend | 36 ----------------------------------- Dockerfile.server | 11 ----------- docker-compose.test.yml | 42 ----------------------------------------- docker-compose.yml | 38 ------------------------------------- 4 files changed, 127 deletions(-) delete mode 100644 Dockerfile.frontend delete mode 100644 Dockerfile.server delete mode 100644 docker-compose.test.yml delete mode 100644 docker-compose.yml diff --git a/Dockerfile.frontend b/Dockerfile.frontend deleted file mode 100644 index f2eeced0..00000000 --- a/Dockerfile.frontend +++ /dev/null @@ -1,36 +0,0 @@ -# Install dependencies only when needed -FROM node:lts-alpine as deps -LABEL org.opencontainers.image.source=https://github.com/thearyadev/top500-aggregator -LABEL org.opencontainers.image.description="Docker image for t500 aggregator frontend" -LABEL org.opencontainers.image.licenses=MIT -WORKDIR /opt/app -COPY frontend/package.json /frontend/bun.lockb ./ -RUN npm install - -# Rebuild the source code only when needed -# This is where because may be the case that you would try -# to build the app based on some `X_TAG` in my case (Git commit hash) -# but the code hasn't changed. -FROM node:lts-alpine as builder - - -ENV NODE_ENV=production -WORKDIR /opt/app - -COPY frontend . -RUN ls -la -COPY --from=deps /opt/app/node_modules ./node_modules -RUN npm run build - -# Production image, copy all the files and run next -FROM node:lts-alpine as runner - - -ARG X_TAG -WORKDIR /opt/app -ENV NODE_ENV=production -COPY --from=builder /opt/app/next.config.js ./ -COPY --from=builder /opt/app/public ./public -COPY --from=builder /opt/app/.next ./.next -COPY --from=builder /opt/app/node_modules ./node_modules -CMD ["node_modules/.bin/next", "start"] \ No newline at end of file diff --git a/Dockerfile.server b/Dockerfile.server deleted file mode 100644 index 938405de..00000000 --- a/Dockerfile.server +++ /dev/null @@ -1,11 +0,0 @@ -FROM python:3.10.13-slim -WORKDIR /t500-aggregator -COPY . . - -LABEL org.opencontainers.image.source=https://github.com/thearyadev/top500-aggregator -LABEL org.opencontainers.image.description="Docker image for t500 aggregator server" -LABEL org.opencontainers.image.licenses=MIT - -RUN pip install poetry==1.6.1 && poetry install --with server --without dev - -ENTRYPOINT poetry run hypercorn --bind 0.0.0.0:8000 server:app diff --git a/docker-compose.test.yml b/docker-compose.test.yml deleted file mode 100644 index f93de740..00000000 --- a/docker-compose.test.yml +++ /dev/null @@ -1,42 +0,0 @@ -version: "3.9" -services: - nginx: - image: nginx:latest - depends_on: - - server - volumes: - - "./nginx.conf:/etc/nginx/nginx.conf" - ports: - - "7779:80" - - server: # port 8000 is server - build: - dockerfile: Dockerfile.server - environment: - MYSQLDATABASE: 'railway' - MYSQLUSER: 'root' - MYSQLPASSWORD: 'QiyWsI7y1oGGJjz4biiu' - MYSQLHOST: 'database' - MYSQLPORT: '3306' - depends_on: - - database - - frontend: - build: - dockerfile: Dockerfile.frontend - ports: - - "3000:3000" - - - # these services are internal, so secrets do not matter. - database: - image: mysql@sha256:566007208a3f1cc8f9df6b767665b5c9b800fc4fb5f863d17aa1df362880ed04 - environment: - MYSQL_DATABASE: 'railway' - MYSQL_USER: 't5aggr' - MYSQL_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' - MYSQL_ROOT_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' - volumes: - - ./mysql-data:/var/lib/mysql - ports: - - "3309:3306" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 4680e1fb..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: "3.9" -services: - nginx: - image: nginx:latest - depends_on: - - server - volumes: - - "./nginx.conf:/etc/nginx/nginx.conf" - ports: - - "7777:80" - - server: # port 8000 is server - - image: ghcr.io/thearyadev/top500-aggregator-server:latest - # build: . - environment: - MYSQLDATABASE: 'railway' - MYSQLUSER: 'root' - MYSQLPASSWORD: 'QiyWsI7y1oGGJjz4biiu' - MYSQLHOST: 'database' - MYSQLPORT: '3306' - depends_on: - - database - - frontend: - image: ghcr.io/thearyadev/top500-aggregator-frontend:latest - ports: - - "3000:3000" - # these services are internal, so secrets do not matter. - database: - image: mysql@sha256:566007208a3f1cc8f9df6b767665b5c9b800fc4fb5f863d17aa1df362880ed04 - environment: - MYSQL_DATABASE: 'railway' - MYSQL_USER: 't5aggr' - MYSQL_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' - MYSQL_ROOT_PASSWORD: 'QiyWsI7y1oGGJjz4biiu' - volumes: - - ./mysql-data:/var/lib/mysql \ No newline at end of file