昨日の続き。
how-to-make-stock-trading-system.dogwood008.com
docker-compose.yml
と Dockerfile
を掲載しておく。
# docker-compose.yml version: '3.9' services: db: image: 'postgres:13.4' environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - PGDATA=/var/lib/postgresql/data volumes: - ./postgresql:/var/lib/postgresql ports: - '5432:5432' db_init: build: context: ./db_init_src command: ruby import.rb working_dir: /app volumes: - ./db_init_src:/app
# Dockerfile FROM ruby:3.0 COPY Gemfile Gemfile COPY Gemfile.lock Gemfile.lock RUN bundle install CMD ruby import.rb