Skip to content

Commit

Permalink
Create a docker-compose local file that exposes the MySQL DB (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
irby authored Dec 8, 2024
1 parent d10df1b commit b038c3c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ git clone https://github.com/laravel/sail.git vendor/laravel/sail/
To run the Docker services, run Docker Compose from the root directory:

```bash
docker-compose -f docker-compose.yml up --build
docker-compose -f docker-compose.local.yml up --build
```

#### Conditional: Install Application Dependencies
Expand Down Expand Up @@ -307,9 +307,9 @@ I.e. if there are errors opening the log file, run `sudo chown -R 1337:www-data

If you run into "The Mix manifest does not exist", then run `docker exec -it hackgreenville php artisan vendor:publish --provider="Laravel\Horizon\HorizonServiceProvider"` and `docker exec -it hackgreenville npm run dev`.

After that, hit Ctrl-C in the original docker-compose to stop the application, and do `docker-compose up --build` to run it again.
After that, hit Ctrl-C in the original docker-compose to stop the application, and do `docker-compose -f docker-compose.local.yml up --build` to run it again.

If there are any changes in the application code, you will need to run `docker-compose up --build` to recreate the container with your changes.
If there are any changes in the application code, you will need to run `docker-compose -f docker-compose.local.yml up --build` to recreate the container with your changes.

#### Import / Seed Organizations and Events Data

Expand Down
16 changes: 16 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3'
services:
hackgreenville:
extends:
file: docker-compose.yml
service: hackgreenville
hackgreenville-db:
ports:
- 3306:3306
extends:
file: docker-compose.yml
service: hackgreenville-db
hackgreenville-redis:
extends:
file: docker-compose.yml
service: hackgreenville-redis

0 comments on commit b038c3c

Please sign in to comment.