changement d'approche avec docker-compose multiple petit container
This commit is contained in:
parent
aefe3fa53f
commit
7592f0fd1d
|
@ -12,14 +12,13 @@ ENV PATH /usr/local/cargo/bin:$PATH
|
||||||
ENV RUST_VERSION 1.42.0
|
ENV RUST_VERSION 1.42.0
|
||||||
|
|
||||||
COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey
|
COPY ./key_create_dunikey.py /usr/bin/key_create_dunikey
|
||||||
COPY ./process-likes-g1tx.sh /usr/bin/process-likes-g1tx
|
|
||||||
COPY ./secret2dunikey.sh /usr/bin/secret2dunikey
|
COPY ./secret2dunikey.sh /usr/bin/secret2dunikey
|
||||||
COPY ./find_ssb_user_G1_pubkey.sh /usr/bin/find_ssb_user_G1_pubkey
|
COPY ./find_ssb_user_G1_pubkey.sh /usr/bin/find_ssb_user_G1_pubkey
|
||||||
COPY ./tip.sh /usr/bin/tip
|
COPY ./tip.sh /usr/bin/tip
|
||||||
|
|
||||||
RUN apt-get update -y && \
|
RUN apt-get update -y && \
|
||||||
apt-get install autoconf=2.69-11.1 build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 curl=7.68.0-1 -y && \
|
apt-get install autoconf=2.69-11.1 build-essential=12.8 python3-pip=18.1-5 python3-setuptools=44.0.0-1 python3-wheel=0.33.6-3 libsodium-dev=1.0.18-1 jq=1.6-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 curl=7.68.0-1 -y && \
|
||||||
chmod +x /usr/bin/secret2dunikey /usr/bin/process-likes-g1tx /usr/bin/key_create_dunikey /usr/bin/find_ssb_user_G1_pubkey && \
|
chmod +x /usr/bin/secret2dunikey /usr/bin/key_create_dunikey /usr/bin/find_ssb_user_G1_pubkey /usr/bin/tip && \
|
||||||
pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \
|
pip3 install duniterpy==0.56.0 silkaj==0.7.6 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
mongo:
|
||||||
|
image: mongo
|
||||||
|
volumes:
|
||||||
|
- "./data/mongo:/data"
|
||||||
|
ohmyform:
|
||||||
|
image: ohmyform/ohmyform
|
||||||
|
#build: .
|
||||||
|
#volumes:
|
||||||
|
# - ".:/opt/app"
|
||||||
|
environment:
|
||||||
|
CREATE_ADMIN: "TRUE"
|
||||||
|
SOCKET_URL: 'localhost:5000'
|
||||||
|
SOCKET_PORT: "5000"
|
||||||
|
SOCKET_PORT_EXTERN_VISIBLE: "TRUE"
|
||||||
|
MONGODB_URI: mongodb://mongo/ohmyform
|
||||||
|
REDIS_URL: redis://redis
|
||||||
|
MAILER_SMTP_HOST: mail
|
||||||
|
MAILER_SMTP_PORT: 1025
|
||||||
|
# command: grunt dev # override command to have livereloading on file change
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
- redis
|
||||||
|
- mail
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
- redis
|
||||||
|
mail:
|
||||||
|
image: mailhog/mailhog
|
||||||
|
ports:
|
||||||
|
- "5050:8025"
|
||||||
|
mongoexpress:
|
||||||
|
image: mongo-express
|
||||||
|
environment:
|
||||||
|
ME_CONFIG_MONGODB_SERVER: mongo
|
||||||
|
ports:
|
||||||
|
- "5051:8081"
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
ssb-server:
|
||||||
|
build:
|
||||||
|
context: ./ssb-server
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports
|
|
@ -0,0 +1,39 @@
|
||||||
|
FROM debian@sha256:bf338ddc710dfb9b907a29ba661b35d0f6b3eae043515c4315f64c6e93409e94
|
||||||
|
|
||||||
|
LABEL MAINTAINER=chamalow <@qio8/4L4vnzq3qRD0dqKI7sTpey54u8ZWbaICfpJOZw=.ed25519>
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ENV NVM_INSTALL_DIR /opt/nvm
|
||||||
|
ENV NVM_DIR /usr/local/nvm
|
||||||
|
ENV NODE_VERSION v12.16.1
|
||||||
|
|
||||||
|
RUN apt-get update -y && \
|
||||||
|
apt-get install autoconf=2.69-11.1 build-essential=12.8 libsodium-dev=1.0.18-1 make=4.2.1-1.2 git=1:2.25.1-1 gcc=4:9.2.1-3.1 base58=1.0.3-1 libtool=2.4.6-14 curl=7.68.0-1 -y && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
|
useradd -ms /bin/bash astroport
|
||||||
|
|
||||||
|
RUN git clone https://github.com/creationix/nvm.git $NVM_INSTALL_DIR && \
|
||||||
|
. $NVM_INSTALL_DIR/nvm.sh && \
|
||||||
|
nvm install --lts && \
|
||||||
|
nvm alias default $NODE_VERSION && \
|
||||||
|
nvm use default && \
|
||||||
|
echo "export NVM_DIR=${NVM_DIR}" > /home/astroport/.bashrc && \
|
||||||
|
echo ". ${NVM_INSTALL_DIR}/nvm.sh" > /home/astroport/.bashrc && \
|
||||||
|
chown -R astroport:astroport $NVM_DIR
|
||||||
|
|
||||||
|
USER astroport
|
||||||
|
WORKDIR /home/astroport
|
||||||
|
|
||||||
|
RUN . ~/.bashrc && \
|
||||||
|
mkdir -p /home/astroport/.ssb/ && \
|
||||||
|
npm install -g sodium-native@3.0.0 ssb-backlinks@1.0.0 && \
|
||||||
|
npm install -g ssb-server@15.2.0
|
||||||
|
|
||||||
|
COPY ./config /home/astroport/.ssb/
|
||||||
|
COPY ./run-ssb-pub.sh /home/astroport/run-ssb-pub.sh
|
||||||
|
|
||||||
|
EXPOSE 8008
|
||||||
|
VOLUME [ "/home/astroport/.ssb" ]
|
||||||
|
ENTRYPOINT [ "/bin/bash" ]
|
||||||
|
CMD [ "/home/astroport/run-ssb-pub.sh" ]
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
. ~/.bashrc
|
||||||
while true; do
|
while true; do
|
||||||
ssb-server start --host 127.0.0.1
|
ssb-server start --host 127.0.0.1
|
||||||
done
|
done
|
Loading…
Reference in New Issue