mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-29 08:00:09 +00:00
docker: refactoring (#735)
* build: switch ubuntu image to lunar * dcoker: support multi-platform builds * docker: strip binary * docker: multicore execution * readme: change docker hub to smp-server
This commit is contained in:
@@ -105,7 +105,7 @@ apt update && apt install openssl
|
||||
|
||||
#### Using Docker
|
||||
|
||||
On Linux, you can deploy smp server using Docker. This will download image from [Docker Hub](https://hub.docker.com/r/simplexchat/simplexmq).
|
||||
On Linux, you can deploy smp server using Docker. This will download image from [Docker Hub](https://hub.docker.com/r/simplexchat/smp-server).
|
||||
|
||||
1. Create `config` and `logs` directories:
|
||||
|
||||
@@ -121,7 +121,7 @@ On Linux, you can deploy smp server using Docker. This will download image from
|
||||
-p 5223:5223 \
|
||||
-v $HOME/simplex/config:/etc/opt/simplex:z \
|
||||
-v $HOME/simplex/logs:/var/opt/simplex:z \
|
||||
simplexchat/simplexmq:latest
|
||||
simplexchat/smp-server:latest
|
||||
```
|
||||
|
||||
#### Ubuntu
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM ubuntu:focal AS final
|
||||
FROM ubuntu:focal AS build
|
||||
FROM --platform=$BUILDPLATFORM ubuntu:23.04 AS final
|
||||
FROM --platform=$BUILDPLATFORM ubuntu:23.04 AS build
|
||||
|
||||
### Build stage
|
||||
|
||||
@@ -23,6 +23,9 @@ WORKDIR /project
|
||||
RUN cabal update
|
||||
RUN cabal install
|
||||
|
||||
# Strip the binary from debug symbols to reduce size
|
||||
RUN strip /root/.cabal/bin/smp-server
|
||||
|
||||
### Final stage
|
||||
|
||||
FROM final
|
||||
|
||||
@@ -24,5 +24,5 @@ fi
|
||||
|
||||
# Finally, run smp-sever. Notice that "exec" here is important:
|
||||
# smp-server replaces our helper script, so that it can catch INT signal
|
||||
exec smp-server start
|
||||
exec smp-server start +RTS -N -RTS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user