Skip to content

Commit

Permalink
Trying to fix docker network issue, cant ping container
Browse files Browse the repository at this point in the history
  • Loading branch information
carTloyal123 committed Mar 4, 2024
1 parent 296f74e commit d84a75b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ google-services.json

# Docker details
emulator/
.venv/
6 changes: 2 additions & 4 deletions docker/apple_silicone/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ services:
network_mode: host
build:
context: server
ports:
- "3030:3030"
container_name: cryze-arm-server
command:
- bash
- -c
- cryze-server --port 3031
3 changes: 2 additions & 1 deletion docker/apple_silicone/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ FROM python:3.11-slim
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir cryze-server

EXPOSE 3030
# Run the start_server.py script
CMD ["cryze-server"]
CMD ["cryze-server", "--port", "3030"]
2 changes: 1 addition & 1 deletion tools/ping_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import websockets

async def send_hello():
async with websockets.connect('ws://localhost:3030') as websocket:
async with websockets.connect('ws://host.docker.internal:3033') as websocket:
await websocket.send('Hello, World!')
print("Message sent!")

Expand Down

0 comments on commit d84a75b

Please sign in to comment.