Skip to content

Commit

Permalink
Better docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bjuraszewski committed Apr 13, 2020
1 parent 17c3dc9 commit 04ac71f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ LOG_CHANNEL=stack
L5_SWAGGER_GENERATE_ALWAYS=false

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_HOST=mysql_service
DB_PORT=3306
DB_DATABASE=store
DB_USERNAME=root
DB_USERNAME=depth
DB_PASSWORD=secret

EMAIL_HOST=mail.example.com
Expand Down
16 changes: 11 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
ports:
- 80:80
volumes:
- vendor-volume:/usr/src/app/vendor
- .:/usr/src/app
command:
- bash
Expand All @@ -18,16 +19,21 @@ services:
touch /usr/src/init
fi
exec apache2-foreground
mysql:
mysql_service:
image: mysql:8.0
restart: always
ports:
- 3306:3306
- ${DB_PORT}:3306
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: store
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
adminer:
image: adminer
restart: always
ports:
- 81:8080
- 81:8080

volumes:
vendor-volume:
5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ Wejście do kontenera (lub z aplikacji)
docker exec -it depth(lub inna nazwa katalogu projektu)_app_1 bash
```

Skasowanie środowiska
```
docker-compose down -v
```

## Styl kodu
Ustaw twoje IDE, zeby korzystało z pliku .editorconfig. W VS Code jest na to dodatek.

Expand Down

0 comments on commit 04ac71f

Please sign in to comment.