Skip to content

Commit

Permalink
Don't bind internal docker-compose services to external IPs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Nov 16, 2023
1 parent 063f327 commit e390be1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ Three services are defined:

| name | access | credentials | description |
|------|-------------------------------------------------|----------------------------|----------------------------------------|
| web | http://localhost:3000 | N/A | A container running the docs.rs binary |
| db | postgresql://cratesfyi:password@localhost:15432 | - | Postgres database used by web |
| s3 | http://localhost:9000 | `cratesfyi` - `secret_key` | MinIO (simulates AWS S3) used by web |
| web | http://0.0.0.0:3000 | N/A | A container running the docs.rs binary |
| db | postgresql://cratesfyi:password@127.0.0.1:15432 | - | Postgres database used by web |
| s3 | http://127.0.0.1:9000 | `cratesfyi` - `secret_key` | MinIO (simulates AWS S3) used by web |

[docker-compose.yml]: ./docker-compose.yml

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
POSTGRES_PASSWORD: password
ports:
# Use a non-standard port on the host to avoid conflicting with existing postgres servers
- "15432:5432"
- "127.0.0.1:15432:5432"
healthcheck:
test: ["CMD", "pg_isready", "--username", "cratesfyi"]
interval: 10s
Expand All @@ -57,8 +57,8 @@ services:
minio server /data --console-address ":9001";
"
ports:
- "9000:9000"
- "9001:9001"
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- minio-data:/data
environment:
Expand All @@ -82,7 +82,7 @@ services:
context: ./dockerfiles
dockerfile: ./Dockerfile-prometheus
ports:
- "9090:9090"
- "127.0.0.1:9090:9090"
healthcheck:
test:
["CMD", "curl", "--silent", "--fail", "localhost:9090/-/ready"]
Expand Down

0 comments on commit e390be1

Please sign in to comment.