-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from pryv/release/1.9.0
Release/1.9.0
- Loading branch information
Showing
14 changed files
with
1,323 additions
and
820 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# commented ones are actually needed | ||
|
||
.git | ||
.github | ||
.vscode | ||
#build | ||
node_modules | ||
**/test | ||
.gitignore | ||
.eslintrc.yml | ||
.licenser.yml | ||
.mocharc.js | ||
application.log | ||
npm-debug.log | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ node_modules/ | |
proxy/nginx.conf | ||
service-mail.iml | ||
npm-debug.log | ||
build/test/pryv/mail/log/mail.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
FROM eu.gcr.io/pryvio/base:1.8.1 | ||
MAINTAINER "Tech@Pryv" <[email protected]> | ||
|
||
# mount build folder | ||
ADD . /pd_build | ||
RUN ls pd_build | ||
FROM eu.gcr.io/pryvio/base:1.9.0 | ||
LABEL maintainer="Pryv<[email protected]>" | ||
|
||
# Set main paths that will be reused in this docker file | ||
ARG TARGET_DIR="/app/bin" | ||
|
@@ -12,25 +8,27 @@ ARG LOG_DIR="/app/log" | |
|
||
# Create software dir | ||
RUN mkdir -p $TARGET_DIR | ||
RUN cp -a /pd_build/bin/. $TARGET_DIR | ||
COPY ../../ $TARGET_DIR | ||
RUN chown -R app $TARGET_DIR | ||
RUN cd $TARGET_DIR && npm ci | ||
|
||
# Install the config file | ||
RUN mkdir -p $CONF_DIR | ||
RUN cp /pd_build/config/mail.json $CONF_DIR/mail.json | ||
COPY ./build/mail/config/mail.json $CONF_DIR/mail.json | ||
|
||
# Create the log | ||
RUN mkdir -p $LOG_DIR | ||
RUN touch $LOG_DIR/mail.log && chown -R app:app $LOG_DIR | ||
|
||
# Install the script that runs the api service | ||
RUN mkdir /etc/service/mail | ||
RUN cp /pd_build/runit/mail /etc/service/mail/run | ||
COPY ./build/mail/runit/mail /etc/service/mail/run | ||
|
||
WORKDIR $TARGET_DIR | ||
RUN cd $TARGET_DIR; ls $TARGET_DIR | ||
RUN npm ci | ||
|
||
|
||
|
||
# Remove cron and sshd entirely, unless we use them | ||
RUN rm -r /etc/service/cron | ||
RUN rm -r /etc/service/sshd && rm /etc/my_init.d/00_regen_ssh_host_keys.sh | ||
|
||
# Install sendmail | ||
RUN ["/bin/bash", "-c", "apt-get update && apt-get install -y --no-install-recommends sendmail"] | ||
|
@@ -40,6 +38,5 @@ RUN apt-get remove -y autoconf automake | |
RUN apt-get autoremove | ||
RUN apt-get clean | ||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
RUN rm -rf /pd_build | ||
|
||
EXPOSE 9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const config = require('/app/conf/mail.json'); | ||
console.log(config?.sendmail?.active ? "TRUE": "FALSE"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Local Docker containers | ||
|
||
Tools to test Docker image builds. | ||
|
||
Requires an AMD64 machine with Docker accessible at user level. | ||
|
||
1. `./build/build test` to build test Docker images | ||
2. `./build/test/start.sh` to run containers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.5' | ||
services: | ||
mail: | ||
image: "localhost/pryvio/mail:test" | ||
container_name: pryvio_mail | ||
ports: | ||
- 9000:9000 | ||
volumes: | ||
- ${PRYV_CONF_ROOT}/pryv/mail/conf/:/app/conf/:ro | ||
- ${PRYV_CONF_ROOT}/../../templates/:/app/bin/templates/:ro | ||
- ${PRYV_CONF_ROOT}/pryv/mail/log/:/app/log/ | ||
environment: | ||
- HOSTNAME=$HOSTNAME | ||
restart: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"logs": { | ||
"prefix": "", | ||
"console": { | ||
"active": true, | ||
"level": "info", | ||
"colorize": true | ||
}, | ||
"file": { | ||
"active": true, | ||
"level": "info", | ||
"path": "/app/log/mail.log" | ||
} | ||
}, | ||
"email": { | ||
"message": { | ||
"from": {"name":"Pryv","address":"[email protected]"} | ||
} | ||
}, | ||
"smtp": {"host":"mail.gandi.net","port":587,"auth":{"user":"[email protected]","pass":"wrzzjiwlktzkybdi"}}, | ||
"sendmail": {"active":false}, | ||
"http": { | ||
"ip": "0.0.0.0", | ||
"port": 9000, | ||
"auth": "fdsuavfhdsvfhsd" | ||
}, | ||
"templates": { | ||
"defaultLang": "en", | ||
"root": "/app/bin/templates/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SCRIPT_FOLDER=$(cd $(dirname "$0"); pwd) | ||
|
||
export PRYV_CONF_ROOT=$SCRIPT_FOLDER | ||
|
||
# Create default directories | ||
mkdir -p ${PRYV_CONF_ROOT}/pryv/mail/log | ||
sudo chown -R 9999:9999 ${PRYV_CONF_ROOT}/pryv/mail/log | ||
|
||
HOSTNAME=l.rec.la docker-compose -f ${PRYV_CONF_ROOT}/pryv.yml up |
Oops, something went wrong.