Fix dead link

Signed-off-by: Kang HuaiShuai <khs1994@khs1994.com>
pull/413/head
Kang HuaiShuai 2019-07-03 12:06:31 +08:00
parent b9247c16df
commit 710c1ec457
No known key found for this signature in database
GPG Key ID: 0A380828B1C243A7
2 changed files with 15 additions and 3 deletions

View File

@ -18,7 +18,7 @@ RUN pip install -r requirements.txt
COPY . /code/
```
使 Python `Dockerfile` [](../image/create.md# Dockerfile ) [ Dockerfile 使](../dockerfile/README.md)
使 Python `Dockerfile` [ Dockerfile 使](../image/dockerfile/README.md)
`requirements.txt`
@ -67,7 +67,7 @@ Dockerfile docker-compose.yml django_example manage.py
Linux,
```bash
sudo chown -R $USER:$USER .
$ sudo chown -R $USER:$USER .
```
`django_example/settings.py` `DATABASES = ...`

View File

@ -17,13 +17,16 @@ ADD Gemfile /myapp/Gemfile
RUN bundle install
ADD . /myapp
```
使 RubyBundler Dockerfile [](../image/create.md# Dockerfile ) [Dockerfile 使](../dockerfile/README.md)
使 RubyBundler Dockerfile [Dockerfile 使](../image/dockerfile/README.md)
Rails `Gemfile` `rails new`
```bash
source 'https://rubygems.org'
gem 'rails', '4.0.2'
```
`docker-compose.yml` `docker-compose.yml` 西 web 使 PostgreSQL web
```yaml
@ -45,11 +48,13 @@ services:
links:
- db
```
使 `docker-compose run`
```bash
$ docker-compose run web rails new . --force --database=postgresql --skip-bundle
```
`Compose` 使 `Dockerfile` web 使 `rails new `
```bash
@ -60,16 +65,19 @@ Gemfile.lock condocker-compose log
README.rdoc condocker-compose.ru public
Rakefile db test
```
`Gemfile` `therubyracer` 便使 Javascript
```bash
gem 'therubyracer', platforms: :ruby
```
`Gemfile` Dockerfile
```bash
$ docker-compose build
```
Rails `localhost` `db` postgres
`database.yml`
@ -87,11 +95,13 @@ test:
<<: *default
database: myapp_test
```
```bash
$ docker-compose up
```
PostgreSQL
```bash
@ -99,11 +109,13 @@ myapp_web_1 | [2014-01-17 17:16:29] INFO WEBrick 1.3.1
myapp_web_1 | [2014-01-17 17:16:29] INFO ruby 2.0.0 (2013-11-22) [x86_64-linux-gnu]
myapp_web_1 | [2014-01-17 17:16:29] INFO WEBrick::HTTPServer#start: pid=1 port=3000
```
```bash
$ docker-compose run web rake db:create
```
web docker 3000
![](../_images/docker-compose-rails-screenshot.png)