Use build+create in Docker installation instructions

There was a typo where we said we were creating the containers but we
were building the image.

While none of these commands are necessary because they're run
automatically when first running the `db:create` rake task, I think it's
better to show them separately, since the `build` command might be used
to rebuild the image, and running the `create` command separately makes
it easier to know what's going on.

We're also removing the "start database service" step, since it's
automatically started because the app service depends on it.

Finally, we're updating one command for macOS.
This commit is contained in:
Javi Martín
2024-09-16 14:18:40 +02:00
parent 2f5ddfd77e
commit d88ea7f26d
2 changed files with 7 additions and 7 deletions

View File

@@ -47,16 +47,16 @@ cp config/secrets.yml.example config/secrets.yml
cp config/database-docker.yml.example config/database.yml
```
Then you'll have to build the container with:
Then build the image with:
```bash
POSTGRES_PASSWORD=password docker-compose build
```
Start the database service:
And create the containers:
```bash
POSTGRES_PASSWORD=password docker-compose up -d database
POSTGRES_PASSWORD=password docker-compose create
```
You can now initialize your development DB and populate it with:

View File

@@ -47,19 +47,19 @@ cp config/secrets.yml.example config/secrets.yml
cp config/database-docker.yml.example config/database.yml
```
Y generamos el contenedor:
Ahora genera la imagen con:
```bash
POSTGRES_PASSWORD=password docker-compose build
```
Arrancamos el servicio de base de datos:
Y crea los contenedores:
```bash
POSTGRES_PASSWORD=password docker-compose up -d database
POSTGRES_PASSWORD=password docker-compose create
```
Ahora podemos crear la base de datos e introducir datos de prueba:
Por último, crea la base de datos e introduce datos de prueba:
```bash
POSTGRES_PASSWORD=password docker-compose run app rake db:create db:migrate