Skip to content

Commit 7d5092c

Browse files
jyn514Joshua Nelson
authored and
Joshua Nelson
committed
Move postgres to a different port
This avoids confusing the host and docker-compose postgres server.
1 parent c9e59af commit 7d5092c

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.env.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CRATESFYI_PREFIX=ignored/cratesfyi-prefix
2-
CRATESFYI_DATABASE_URL=postgresql://cratesfyi:password@localhost
2+
CRATESFYI_DATABASE_URL=postgresql://cratesfyi:password@localhost:15432
33
RUST_LOG=cratesfyi,rustwide=info
44
AWS_ACCESS_KEY_ID=cratesfyi
55
AWS_SECRET_ACCESS_KEY=secret_key

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Three services are defined:
111111
| name | access | credentials | description |
112112
|------|-------------------------------------------------|----------------------------|----------------------------------------|
113113
| web | http://localhost:3000 | N/A | A container running the docs.rs binary |
114-
| db | postgresql://cratesfyi:password@localhost:5432/ | - | Postgres database used by web |
114+
| db | postgresql://cratesfyi:password@localhost:15432/ | - | Postgres database used by web |
115115
| s3 | http://localhost:9000 | `cratesfyi` - `secret_key` | Minio (simulates AWS S3) used by web |
116116

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

docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ services:
3333
POSTGRES_USER: cratesfyi
3434
POSTGRES_PASSWORD: password
3535
ports:
36-
- "5432:5432"
36+
# Use a non-standard port on the host to avoid conflicting with existing postgres servers
37+
- "15432:5432"
3738
s3:
3839
image: minio/minio
3940
entrypoint: >

0 commit comments

Comments
 (0)