Skip to content

Commit

Permalink
Add Helpful Docker Commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Neal Chambers committed Oct 23, 2024
1 parent 3e0be85 commit 4209818
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@ $ docker/build
```sh
$ docker/server
```
* Alternatively, you can run the server in detached mode. This will return you to the terminal prompt without stopping the server. No logs will be displayed:
```sh
$ docker compose up -d
```
* To stop the server, run:
```sh
$ docker compose down
```
* To access the server logs, run:
```sh
$ docker compose logs -f
```
* To run tests or access the server directly, you can use bash:
```sh
$ docker compose exec web bash
```
* Once you have connected, you can run tests and other operations without `bundle exec`:
```sh
$ rspec spec/models/voucher_spec.rb
```
* The default admin user is '[email protected]' with the password 'ofn123'.
* View the app in the browser at `http://localhost:3000`.
* You will then get the trace of the containers in the terminal. You can stop the containers using Ctrl-C in the terminal.
Expand Down Expand Up @@ -76,6 +96,26 @@ $ docker/build.ps1
```command
$ docker/server.ps1
```
* Alternatively, you can run the server in detached mode. This will return you to the terminal prompt without stopping the server. No logs will be displayed:
```sh
$ docker compose up -d
```
* To stop the server, run:
```sh
$ docker compose down
```
* To access the server logs, run:
```sh
$ docker compose logs -f
```
* To run tests or access the server directly, you can use bash:
```sh
$ docker compose exec web bash
```
* Once you have connected, you can run tests and other operations without `bundle exec`:
```sh
$ rspec spec/models/voucher_spec.rb
```
You may need to wait several minutes before getting the server up and running properly.
* The default admin user is '[email protected]' with the password 'ofn123'.
* View the app in the browser at `http://localhost:3000`.
Expand Down

0 comments on commit 4209818

Please sign in to comment.