Skip to content

Commit

Permalink
馃懛 Include a Client container in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
zaq42 committed Feb 26, 2023
1 parent 9d4e2e2 commit 5f4281a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
19 changes: 17 additions & 2 deletions Server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

In this folder, `Dockerfile` runs the Flask Server in a container.

The `docker-compose.yml` defines a cluster with the Server and a local PostgreSQL container
The `docker-compose.yml` defines a cluster with the Server and a local PostgreSQL container.
It also runs as well as a client, assuming that the client is in `../client` from this location.

For convenience, a Makefile supports the following simple operations:

Expand All @@ -29,14 +30,28 @@ The problem was the use of the `slim-` base image. Switching from `p`ython:3.9.

### Ventura - Flask default port 5000

Flask runs by default on port 5000. However, on macos Ventura, there is a system service "Airplay Receiver" listening on this port.
Flask runs by default on port 5000. However, on macOS Ventura, there is a system service "Airplay Receiver" listening on this port.

In this case, `localhost:5000` does not reach the Flask app, although `127.0.0.1:5000` does.

The easiest solution is to turn off the Airplay Receiver service; an alternative is to run Flask on a different port... perhaps 7355 for TESS?

[Here's a full discussion of the issue](https://blog.yimingliu.com/2023/01/01/cannot-connect-to-flask-development-server-on-localhost-port-5000/).

### Supabase, local

Following the guidance [here](https://supabase.com/docs/guides/self-hosting/docker) I was able to get Supabase running locally.

```
git clone --depth 1 https://github.com/supabase/supabase
cd supabase/docker
cp .env.example .env
docker compose up
```

However, the vanilla installation is complicated, unconfigured and potentially of limited utility.


## Current Issue

The server responds to `http://localhost:5000` with a classic "Hello World"
Expand Down
14 changes: 13 additions & 1 deletion Server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@ services:
- "5432"
networks:
- back-tier
client:
build:
context: ../../client
ports:
- "3000:3000"
expose:
- "3000"
depends_on:
- server
networks:
- front-tier
- back-tier

networks:
# front-tier: {}
front-tier: {}
back-tier: {}

0 comments on commit 5f4281a

Please sign in to comment.