simplex-chat / simplexmq

⚙️ SimpleXMQ - A reference implementation of the SimpleX Messaging Protocol for simplex queues over public networks.
https://simplex.chat
GNU Affero General Public License v3.0
473 stars 55 forks source link

Can't Connect to Server (Docker) #574

Open ghost opened 1 year ago

ghost commented 1 year ago

I am using Simplex 4.3 beta to check if I have connection to my self hosted local docker server but I cannot pass the check. I used the following docker commands:

docker run -d \
      --name smp-server \
      -e addr=192.168.2.57 \
      -p 5223:5223 \
      -v ${PWD}/scripts/docker/config:/etc/opt/simplex \
      -v ${PWD}/scripts/docker/logs:/var/opt/simplex \
      smp-server

Then smp-server init and smp-server start. Then trying to connect with smp://fingerprint@192.168.2.57. I think a docker-compose would be helpful for newcomers like myself. Thanks

GoofyAF commented 1 year ago

I think that you need to specify the :z option for your volumes. I believe that will strip away some selinux context that might be breaking your startup.

Here is my docker-compose file FYI:

---
version: '3.7'
services: 

  smp-server:
    image: smp-server:latest
    container_name: smp
    restart: unless-stopped
    ports:
      - 5223:5223
    volumes:
      - ./config:/etc/opt/simplex:z
      - ./logs:/var/opt/simplex:z
    environment:
      - pass=${PASSWORD}
      - addr=${HOSTNAME}
glacialcalamity commented 1 year ago

I think that you need to specify the :z option for your volumes. I believe that will strip away some selinux context that might be breaking your startup.

Here is my docker-compose file FYI:

---
version: '3.7'
services: 

  smp-server:
    image: smp-server:latest
    container_name: smp
    restart: unless-stopped
    ports:
      - 5223:5223
    volumes:
      - ./config:/etc/opt/simplex:z
      - ./logs:/var/opt/simplex:z
    environment:
      - pass=${PASSWORD}
      - addr=${HOSTNAME}

@GoofyAF, can you drop the actual Entrypoint configuration you have to enable the docker compose setup? For me, the image doesn't complete a full start up and loops indefinitely.