From eb5268deff19a15e7ae7ea4497903e1a797282d5 Mon Sep 17 00:00:00 2001 From: Noah Durbin <13364668+noahdurbin@users.noreply.github.com> Date: Mon, 26 Aug 2024 12:56:12 -0600 Subject: [PATCH] feat: dockercompose to spin up pg --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2cd9d75 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "3" +services: + db: + image: postgres:14 + volumes: + - ./tmp/db:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: password + web: + build: . + command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3001 -b '0.0.0.0'" + volumes: + - .:/app + ports: + - "3001:3001" + depends_on: + - db + environment: + DATABASE_URL: postgres://postgres:password@db:5432/turlink_be_development + PORT: 3001