Recommend building the image with docker-compose
If we used the `docker build` to build the image and then `docker-compose`, we'd build two images.
This commit is contained in:
@@ -80,16 +80,16 @@ cp config/database-docker.yml.example config/database.yml
|
||||
Then you'll have to build the container with:
|
||||
|
||||
```bash
|
||||
docker build -t consul .
|
||||
POSTGRES_PASSWORD=password docker-compose build
|
||||
```
|
||||
|
||||
Create your app database images:
|
||||
Start the database service:
|
||||
|
||||
```bash
|
||||
POSTGRES_PASSWORD=password docker-compose up -d database
|
||||
```
|
||||
|
||||
Once built you can initialize your development DB and populate it with:
|
||||
You can now initialize your development DB and populate it with:
|
||||
|
||||
```
|
||||
POSTGRES_PASSWORD=password docker-compose run app rake db:create db:migrate
|
||||
|
||||
@@ -80,16 +80,16 @@ cp config/database-docker.yml.example config/database.yml
|
||||
Y generamos el contenedor:
|
||||
|
||||
```bash
|
||||
docker build -t consul .
|
||||
POSTGRES_PASSWORD=password docker-compose build
|
||||
```
|
||||
|
||||
Creamos las imágenes de base de datos:
|
||||
Arrancamos el servicio de base de datos:
|
||||
|
||||
```bash
|
||||
POSTGRES_PASSWORD=password docker-compose up -d database
|
||||
```
|
||||
|
||||
Una vez creada la imagen, podemos crear la base de datos e introducir datos de prueba:
|
||||
Ahora podemos crear la base de datos e introducir datos de prueba:
|
||||
|
||||
```
|
||||
POSTGRES_PASSWORD=password docker-compose run app rake db:create db:migrate
|
||||
|
||||
Reference in New Issue
Block a user