GithubHelp home page GithubHelp logo

docker_sample's Introduction

docker_sample

https://qiita.com/at-946/items/08de3c9d7611f62b1894

  1. docker準備
$ docker-compose build
  1. Nuxt.js作成

cloneしてきた直後もやるけど、nuxt.configとかが書き変わりそうなので見直す

docker-compose run --rm front npx create-nuxt-app

? Choose the package manager     --> Npm
? Choose Nuxt.js modules         --> Axios
? Choose rendering mode          --> Universal (SSR)

Axiosを選択するのを忘れずに

$ docker-compose up front
  1. Railsの準備

作成するときに必要なだけでcloneしてきた場合には不要

$ docker-compose run --rm api rails new . -f -d postgresql --api

以下は必要

$ docker-compose build api
$ docker-compose run --rm api rails db:create
$ docker-compose run --rm api rails db:migrate
$ docker-compose up -d api
  1. NuxtとRails合体

docker-compose.ymlから ・apiのportsを消す ・frontのdepends_onを追加

$ docker-compose up

docker_sample

docker_sample's People

Contributors

aiyu427 avatar

Watchers

 avatar

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.