Merge pull request #29 from Expand-sys/Refractor

missing docker files
This commit is contained in:
William Katz 2021-07-12 15:03:21 -07:00 committed by GitHub
commit f0c8920da1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 3 deletions

View file

@ -1,10 +1,12 @@
FROM alpine:3.11
WORKDIR /CCash
WORKDIR /
RUN apk update && apk add cmake g++ make protobuf jsoncpp-dev openssl libressl-dev zlib-dev util-linux-dev libtool autoconf automake python3
RUN apk update && apk add git cmake g++ make protobuf jsoncpp-dev openssl libressl-dev zlib-dev util-linux-dev libtool autoconf automake python3
COPY . .
RUN git clone --recurse-submodules https://github.com/EntireTwix/CCash.git --branch Refractor
WORKDIR /CCash/third_party/base64/
RUN AVX2_CFLAGS=-mavx2 SSSE3_CFLAGS=-mssse3 SSE41_CFLAGS=-msse4.1 SSE42_CFLAGS=-msse4.2 AVX_CFLAGS=-mavx make lib/libbase64.o
RUN mkdir /CCash/build
WORKDIR /CCash/build
RUN cmake -DDROGON_CONFIG_LOC=\"\/CCash\/config\/config.json\" -DUSER_SAVE_LOC=\"\/CCash\/config\/users.json\" ..

16
config/config.json Normal file
View file

@ -0,0 +1,16 @@
{
"listeners": [
{
"address": "0.0.0.0",
"port": 80,
"https": false
},
{
"address": "0.0.0.0",
"port": 443,
"https": true,
"cert": "/CCash/config/cert.cert",
"key": "/CCash/config/key.key"
}
]
}

9
config/ssl.sh Normal file
View file

@ -0,0 +1,9 @@
#!/bin/bash
openssl genrsa -out server.pass.key 2048
openssl rsa -in server.pass.key -out /CCash/config/key.key
rm server.pass.key
openssl req -new -key /CCash/config/key.key -out server.csr \
-subj "/C=US/ST=CCashland/L=NEW CCASH/O=CCash/OU=Devs/CN=localhost"
openssl x509 -req -days 365 -in server.csr -signkey /CCash/config/key.key -out /CCash/config/cert.cert

7
config/users.json Normal file
View file

@ -0,0 +1,7 @@
{
"": {
"balance": 0,
"log": null,
"password": 0
}
}