-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix - some configuration issue with nginx
- Loading branch information
1 parent
e7494ed
commit 57ca61e
Showing
4 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,14 +24,17 @@ Each image can be built using the following command. | |
|
||
### Postgres | ||
|
||
# to run the migrations when starting the database | ||
--volume $(pwd)/migrations:/docker-entrypoint-initdb:ro \ | ||
# today, the 30th of april 2022, this is the latest release | ||
postgres:14.2-bullseye | ||
|
||
```bash | ||
docker run -d \ | ||
--name eco-benchmark-database \ | ||
# to run the migrations when starting the database | ||
--volume $(pwd)/migrations:/docker-entrypoint-initdb:ro \ | ||
--port 5432:5432 \ | ||
-p 5432:5432 \ | ||
-e POSTGRES_PASSWORD=mysecretpassword \ | ||
# today, the 30th of april 2022, this is the latest release | ||
postgres:14.2-bullseye | ||
|
||
export DATABASE_URL=postgresql://postgres:[email protected]:5432/postgres | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
# How to run | ||
|
||
## Build the image | ||
For Mac with M1, you need to add --platform linux/amd64 | ||
|
||
```bash | ||
docker build -t benchmark-php-symfony-nginx . | ||
``` | ||
|
||
## Run the container | ||
### Get database IP addresses | ||
```bash | ||
docker inspect \ | ||
-f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' eco-benchmark-database | ||
``` | ||
|
||
Be careful to replace the IP address of the database (172.17.0.2) with the previously obtained result. | ||
|
||
```bash | ||
docker run --name=benchmark-php-symfony-nginx -d -p 8080:8080 -e DATABASE_URL='postgresql://postgres:[email protected]:5432/postgres' benchmark-php-symfony-nginx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters