From e3e4e01a721e41ffaec1bcf2a7fd6a55b28d2929 Mon Sep 17 00:00:00 2001 From: Shiva Menta Date: Sun, 5 Nov 2023 13:50:03 -0500 Subject: [PATCH] Remove Docker Compose Changes --- docker-compose.test.yaml | 103 ++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 56 deletions(-) diff --git a/docker-compose.test.yaml b/docker-compose.test.yaml index 30753160e..d7a1c4dc4 100644 --- a/docker-compose.test.yaml +++ b/docker-compose.test.yaml @@ -1,64 +1,55 @@ version: "3" services: - # postgres: - # image: postgres - # environment: - # - POSTGRES_DB=postgres - # - POSTGRES_USER=postgres - # - POSTGRES_PASSWORD=postgres - db: + postgres: image: postgres - command: postgres environment: - POSTGRES_DB=postgres - - POSTGRES_USER=penn-clubs + - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres + traefik: + image: "traefik:v2.3" + container_name: "traefik" + command: + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" ports: - - 5432:5432 - # traefik: - # image: "traefik:v2.3" - # container_name: "traefik" - # command: - # - "--api.insecure=true" - # - "--providers.docker=true" - # - "--providers.docker.exposedbydefault=false" - # - "--entrypoints.web.address=:80" - # ports: - # - "80:80" - # - "8080:8080" - # volumes: - # - "/var/run/docker.sock:/var/run/docker.sock:ro" - # backend: - # image: "pennlabs/penn-clubs-backend:latest" - # environment: - # DJANGO_SETTINGS_MODULE: pennclubs.settings.ci - # DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres" - # healthcheck: - # test: python manage.py migrate --check - # interval: 10s - # timeout: 5s - # retries: 5 - # depends_on: - # - postgres - # labels: - # - "traefik.enable=true" - # - "traefik.http.routers.backend.rule=Host(`traefik`) && PathPrefix(`/api`)" - # - "traefik.http.routers.backend.entrypoints=web" - # - "traefik.http.services.backend.loadbalancer.server.port=80" - # frontend: - # image: "pennlabs/penn-clubs-frontend:latest" - # command: ["yarn", "start"] - # environment: - # DOMAIN: http://traefik - # labels: - # - "traefik.enable=true" - # - "traefik.http.routers.frontend.rule=Host(`traefik`)" - # - "traefik.http.routers.frontend.entrypoints=web" - # - "traefik.http.services.frontend.loadbalancer.server.port=3000" - # # volumes: - # # - type: bind - # # source: /tmp/test-results - # # target: /app/test-results - # # https://github.com/cypress-io/cypress/issues/350 - # ipc: host + - "80:80" + - "8080:8080" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + backend: + image: "pennlabs/penn-clubs-backend:latest" + environment: + DJANGO_SETTINGS_MODULE: pennclubs.settings.ci + DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres" + healthcheck: + test: python manage.py migrate --check + interval: 10s + timeout: 5s + retries: 5 + depends_on: + - postgres + labels: + - "traefik.enable=true" + - "traefik.http.routers.backend.rule=Host(`traefik`) && PathPrefix(`/api`)" + - "traefik.http.routers.backend.entrypoints=web" + - "traefik.http.services.backend.loadbalancer.server.port=80" + frontend: + image: "pennlabs/penn-clubs-frontend:latest" + command: ["yarn", "start"] + environment: + DOMAIN: http://traefik + labels: + - "traefik.enable=true" + - "traefik.http.routers.frontend.rule=Host(`traefik`)" + - "traefik.http.routers.frontend.entrypoints=web" + - "traefik.http.services.frontend.loadbalancer.server.port=3000" + # volumes: + # - type: bind + # source: /tmp/test-results + # target: /app/test-results + # https://github.com/cypress-io/cypress/issues/350 + ipc: host