<commit_before>version: '3.3'

# Set up the Selenium container based on the Selenium official:
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/docker-compose-v3.yml
# And:
# https://medium.com/@retrorubies/chrome-as-a-service-for-rails-testing-b1a45e70fec1
services:
  web: &web
    image: jade:rails-app-3.0-postgres-13-bullseye
    tmpfs:
      - /tmp
    stdin_open: true
    tty: true
    volumes:
      - .:/app:cached
      - rails_cache:/app/tmp/cache
      - bundle:/app/vendor/bundle
      - node_modules:/app/node_modules
      - packs:/app/public/packs
    environment:
      - NODE_ENV=development
      # You can use DATABASE_URL in non-development situation, but it messes
      # up the `rails db:*` tasks in a development situation.
      # - DATABASE_URL=postgres://pg:pg@postgres:5432
      - DATABASE_HOST=postgres
      - BOOTSNAP_CACHE_DIR=/usr/local/bundle/_bootsnap
      - WEBPACKER_DEV_SERVER_HOST=webpacker
      - WEB_CONCURRENCY=1
      - EDITOR=vi
      # SELENIUM_HUB_URL was a suggestion from the Internet when you use
      # Selenium Hub, which is good for testing a range of browsers.
      # - SELENIUM_HUB_URL=http://selenium-hub:4444/wd/hub
      # Going to use a generic name for where Selenium is
      - SELENIUM_SERVER=http://chrome:4444/wd/hub
      - TEST_APP_HOST=server
      - TEST_APP_PORT=3001
    # Running dev here is a little tricky. You have to remember that Ctrl-C
    # only stops the container, it doesn't destroy it. So next time you up, it
    # will complain that the server is already running.

    # It might be okay as long as you remember to start or run the container,
    # instead of trying up, but I haven't had a chance to test it yet.
    command: /bin/bash
    depends_on:
      - postgres
    ports:
      - "3000:3000"
      - "3001:3001"

  shell:
    <<: *web
  postgres:<commit_msg>Better docker-compose.yml<commit_after>version: '3.3'

# Set up the Selenium container based on the Selenium official:
# https://github.com/SeleniumHQ/docker-selenium/blob/trunk/docker-compose-v3.yml
# And:
# https://medium.com/@retrorubies/chrome-as-a-service-for-rails-testing-b1a45e70fec1
services:
  shell: &shell
    image: jade:rails-app-3.0-postgres-13-bullseye
    tmpfs:
      - /tmp
    stdin_open: true
    tty: true
    volumes:
      - .:/app:cached
      - rails_cache:/app/tmp/cache
      - bundle:/app/vendor/bundle
      - node_modules:/app/node_modules
      - packs:/app/public/packs
    environment:
      - NODE_ENV=development
      # You can use DATABASE_URL in non-development situation, but it messes
      # up the `rails db:*` tasks in a development situation.
      # - DATABASE_URL=postgres://pg:pg@postgres:5432
      - DATABASE_HOST=postgres
      - BOOTSNAP_CACHE_DIR=/usr/local/bundle/_bootsnap
      - WEBPACKER_DEV_SERVER_HOST=webpacker
      - WEB_CONCURRENCY=1
      - EDITOR=vi
      # SELENIUM_HUB_URL was a suggestion from the Internet when you use
      # Selenium Hub, which is good for testing a range of browsers.
      # - SELENIUM_HUB_URL=http://selenium-hub:4444/wd/hub
      # Going to use a generic name for where Selenium is
      - SELENIUM_SERVER=http://chrome:4444/wd/hub
      - TEST_APP_HOST=server
      - TEST_APP_PORT=3001
    # Running dev here is a little tricky. You have to remember that Ctrl-C
    # only stops the container, it doesn't destroy it. So next time you up, it
    # will complain that the server is already running.

    # It might be okay as long as you remember to start or run the container,
    # instead of trying up, but I haven't had a chance to test it yet.
    command: /bin/bash
    depends_on:
      - postgres

  web: &web
    <<: *shell
    ports:
      - "3000:3000"
      - "3001:3001"
    command: bin/rails s -b 0.0.0.0

  postgres:
{'fraction_non_alphanumeric': 0.09678270042194093, 'fraction_numerical': 0.02531645569620253, 'mean_word_length': 2.6261950286806885, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4357196', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1279, 'n_words': 342}