Skip to content

Commit

Permalink
Makes Dockerfile to multi stage build
Browse files Browse the repository at this point in the history
Eliminates a compile time warning
  • Loading branch information
root committed Jan 28, 2021
1 parent 885f61d commit 6bf8950
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
20 changes: 9 additions & 11 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@
# https://github.com/hyper-prog/hasses
#

FROM alpine
LABEL maintainer="[email protected]" Description="Hasses asynchronous SSE server"

RUN apk update \
&& apk add openssl
FROM alpine AS hassesbuildstage
RUN apk update && apk add openssl
COPY . /hasses/
RUN apk add libc-dev gcc make openssl-dev \
&& cd /hasses \
&& make && make install \
&& cd / && rm -rf /hasses \
&& apk del libc-dev gcc make openssl-dev \
&& mkdir /hassescommon
&& make && make install


FROM alpine AS hassesdaemon
LABEL maintainer="[email protected]" Description="Hasses asynchronous SSE server"
RUN apk update && apk add openssl
COPY --from=hassesbuildstage /usr/local/bin/hasses /usr/local/bin/

EXPOSE 8080
EXPOSE 8085

VOLUME ["/hassescommon"]

CMD ["-p=8080","-cp=8085","-murl=/sse","-nodaemon"]
# Srart hasses daemon when container runs
ENTRYPOINT ["/usr/local/bin/hasses"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The sse requests matches to the /sse locations by default.
#a2enmod proxy_http

To the enabled site:

ProxyPreserveHost On
ProxyPass /sseeventprovider http://0.0.0.0:8080/sseeventprovider
ProxyPassReverse /sseeventprovider http://0.0.0.0:8080/sseeventprovider
Expand All @@ -82,7 +82,7 @@ To the enabled site outside the "server" section:
keepalive 3200;
}

To the enabled site inside the "server" section:
To the enabled site inside the "server" section:

location /sseeventprovider {
proxy_buffering off;
Expand All @@ -93,7 +93,7 @@ To the enabled site inside the "server" section:
chunked_transfer_encoding on;
proxy_pass http://ssebackend;
}


Debugging / Troubleshooting
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef HASSES_CHAT_H
#define HASSES_CHAT_H

struct CliConn *client;
struct CliConn;
struct Hasses_Settings;
struct Hasses_Statistics;

Expand Down
2 changes: 1 addition & 1 deletion hasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef HASSES_HASSES_H
#define HASSES_HASSES_H

#define VERSION "1.22"
#define VERSION "1.23"

/* The client timeout check interval in seconds */
#define CLIENT_CHK_TIME_INTERVAL 60
Expand Down

0 comments on commit 6bf8950

Please sign in to comment.