diff --git a/docker-compose.yml b/docker-compose.yml index 3701219ff..bddd638bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,43 +2,53 @@ version: '3.4' services: postgres: - image: "postgres:11.5" + command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c max_connections=200 environment: POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-password}" POSTGRES_USER: "${POSTGRES_USER:-postgres}" + PGDATA: /tmp + image: postgis/postgis:14-3.3-alpine volumes: - - "./data:/var/lib/postgresql/data" - command: "postgres -c 'bytea_output=escape'" + - postgres_data:/var/lib/postgresql/data + ports: + - 54321:5432 + gibct: build: context: . target: development image: "gibct:${DOCKER_IMAGE:-latest}" volumes: - - ".:/srv/gi-bill-data-service/src/:cached" + - .:/gi-bill-data-service/src/:cached - dev_bundle:/usr/local/bundle + - ./tmp/Downloads:/mnt/downloads:/srv/gi-bill-data-service/Downloads + working_dir: /gi-bill-data-service/src ports: - - 3000:3000 + - 4000:4000 environment: - DATABASE_URL: "postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-password}@${POSTGRES_HOST:-postgres}:${POSTGRES_PORT:-5432}/${POSTGRES_DATABASE:-vets_api_development}?pool=4" + DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true + DATABASE_URL: "postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-password}@${POSTGRES_HOST:-postgres}:${POSTGRES_PORT:-5432}/${POSTGRES_DATABASE:-gibct-data-service_development}?pool=4" + DATABASE_TEST_URL: "postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-password}@${POSTGRES_HOST:-postgres}:${POSTGRES_PORT:-5432}/${POSTGRES_DATABASE:-gibct-data-service_test}?pool=4" POSTGRES_PORT: "${POSTGRES_PORT:-5432}" POSTGRES_USER: "${POSTGRES_USER:-postgres}" POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-password}" SECRET_KEY_BASE: 0ae77385a98d4d28886d792832fbbe036152efb4a112fae2d06261850a5b6728 - LINK_HOST: https://www.example.com - GIBCT_URL: https://www.example.com - SANDBOX_URL: https://www.example.com - ADMIN_EMAIL: 'something@example.gov' - ADMIN_PW: 'something...' GOVDELIVERY_URL: 'stage-tms.govdelivery.com' GOVDELIVERY_TOKEN: 'abc123' GOVDELIVERY_STAGING_SERVICE: 'True' DEPLOYMENT_ENV: 'vagov-dev' - CI: 'true' + # CI: 'true' + LOCAL_USER: ${LOCAL_USER} + LOCAL_PASS: ${LOCAL_PASS} + STAGE_USER: ${STAGE_USER} + STAGE_PASS: ${STAGE_PASS} + PROD_USER: ${PROD_USER} + PROD_PASS: ${PROD_PASS} depends_on: - postgres links: - postgres - command: bash --login -c "bundle exec rails s" + command: bash --login -c "bundle exec rails s -p 4000 -b 0.0.0.0" volumes: dev_bundle: + postgres_data: