Skip to content

Commit

Permalink
fix: fixed server not being able to connect in docker network
Browse files Browse the repository at this point in the history
  • Loading branch information
stefa168 committed Nov 20, 2023
1 parent fe84675 commit b339e6d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "growatt_server"
version = "0.1.3"
version = "0.1.3-a"
edition = "2021"
authors = ["Stefano Vittorio Porta <[email protected]>"]
repository = "https://github.com/stefa168/growatt_server"
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: "3.9"
services:
growatt_server:
image: stefa168/growatt_server:latest
# image: stefa168/growatt_server:latest
build: .
ports:
- "5279:5279/tcp"
volumes:
- ./inverters:/usr/local/bin/inverters
networks:
postgres-net:
timescale:
container_name: timescale
image: timescale/timescaledb-ha:pg15.3-ts2.11.0-all
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
let db_opts = PgConnectOptions::new()
.username("postgres")
.password("password")
.host("localhost")
.port(5433)
.host("timescale")
.port(5432)
.database("postgres");

let db_pool = match PgPool::connect_with(db_opts).await {
Expand Down

0 comments on commit b339e6d

Please sign in to comment.