Add Dockerfile for server
This commit is contained in:
parent
ccf99e318e
commit
415e5de1de
@ -2,20 +2,20 @@
|
||||
; %ROOT_DIR% is replaced by the actual directory of the package
|
||||
storage_dir = %ROOT_DIR%/var/storage
|
||||
|
||||
; Allow network-wide connections for queries
|
||||
query_dsn[] = ipc:///tmp/storage_server_query.ipc
|
||||
query_dsn[] = tcp://0.0.0.0:5678
|
||||
|
||||
; Allow local connections for commands
|
||||
command_dsn[] = ipc:///tmp/storage_server_command.ipc
|
||||
command_dsn[] = tcp://127.0.0.1:5679
|
||||
command_dsn[] = tcp://0.0.0.0:5679
|
||||
|
||||
|
||||
[command]
|
||||
; Connect through IPC socket
|
||||
dsn = ipc:///tmp/storage_server_command.ipc
|
||||
; Use TCP - in order to use IPC, create a volume in docker-compose.yaml
|
||||
;dsn = ipc:///tmp/storage_server_command.ipc
|
||||
dsn = tcp://localhost:5679
|
||||
|
||||
|
||||
[query]
|
||||
; Connect through TCP socket
|
||||
; Use TCP - in order to use IPC, create a volume in docker-compose.yaml
|
||||
;dsn = ipc:///tmp/storage_server_query.ipc
|
||||
dsn = tcp://localhost:5678
|
||||
|
13
docker-compose.yaml
Normal file
13
docker-compose.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
version: "3"
|
||||
services:
|
||||
server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/server/Dockerfile
|
||||
volumes:
|
||||
# You may add volumes for IPC binding here too
|
||||
- ./var:/usr/src/fileserver/var
|
||||
ports:
|
||||
- 5678:5678
|
||||
- 5679:5679
|
||||
|
16
docker/server/Dockerfile
Normal file
16
docker/server/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
FROM php:7.4-cli
|
||||
|
||||
RUN apt-get update -qq && apt-get install -y git libzmq3-dev rsync -qq >/dev/null
|
||||
|
||||
# Get the latest version of php-zmq
|
||||
RUN git clone git://github.com/mkoppanen/php-zmq.git --depth=1 >/dev/null && cd php-zmq \
|
||||
&& phpize >/dev/null && ./configure >/dev/null \
|
||||
&& make >/dev/null && make install >/dev/null \
|
||||
&& cd .. && rm -rf php-zmq
|
||||
|
||||
RUN docker-php-ext-enable zmq
|
||||
|
||||
COPY . /usr/src/fileserver
|
||||
WORKDIR /usr/src/fileserver
|
||||
|
||||
CMD [ "php", "bin/server" ]
|
Loading…
Reference in New Issue
Block a user