Giter Site home page Giter Site logo

nisyuu / sasakisan Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 248 KB

佐々木さんが勤怠管理をお手伝いします🤺

Home Page: https://sasakisan.herokuapp.com/

License: MIT License

Dockerfile 1.06% Ruby 69.54% JavaScript 4.46% CSS 0.82% SCSS 4.72% HTML 19.34% Shell 0.07%
rails docker-compose ruby

sasakisan's Introduction

環境

  • Ruby 2.7.4
  • Rails 6.1.4.1

ローカル環境立ち上げ手順

まずはDockerをインストールしてください。 https://docs.docker.com/desktop/mac/install/

コンテナをビルド

docker-compose build

database.yml作成

configディレクトリ内に作成してください。

default: &default
  adapter: mysql2
  encoding: utf8mb4
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: root
  password:
  host: localhost

development:
  <<: *default
  database: app_development
  host: db
  username: root
  password: password

test:
  <<: *default
  database: app_test
  host: db
  username: root
  password: password

データベースを作成

docker-compose run web rails db:create

Webpackerをインストール

docker-compose run web rails webpacker:install

Overwrite /app/config/webpack/environment.js? (enter "h" for help) [Ynaqdhm]と尋ねられたらnを入力してそのままエンターを押してください。

コンテナを起動

docker-compose up

localhost:3000にアクセスしてRailsの初期画面が表示されることを確認しましょう。

docker-compose コマンド操作

バックグラウンドで起動

docker-compose up

シャットダウン

docker-compose down

コンテナ内のシェルにログイン

docker-compose exec web sh

もしくは

docker-compose exec web /bin/bash

sasakisan's People

Contributors

nisyuu avatar

Watchers

 avatar

Forkers

mahiru-neco

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.