solve docker issue
This commit is contained in:
parent
7c35f310d8
commit
75e5f54ab1
29
Dockerfile
29
Dockerfile
|
@ -1,29 +0,0 @@
|
||||||
FROM debian:buster
|
|
||||||
LABEL version 1.0+beta.2
|
|
||||||
|
|
||||||
ENV JENKINS_HOME /var/jenkins
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
ENV REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt
|
|
||||||
|
|
||||||
#download through the french mirror
|
|
||||||
RUN sed -i 's/deb\./ftp.fr./' /etc/apt/sources.list
|
|
||||||
|
|
||||||
RUN apt-get upgrade -y && apt-get update
|
|
||||||
RUN apt-get -y install \
|
|
||||||
git \
|
|
||||||
libnss-ldapd \
|
|
||||||
libpam-ldapd \
|
|
||||||
locales \
|
|
||||||
maven \
|
|
||||||
nfs-common \
|
|
||||||
ntp \
|
|
||||||
openjdk-8-jdk \
|
|
||||||
openssh-server \
|
|
||||||
python2.7 \
|
|
||||||
sudo \
|
|
||||||
supervisor \
|
|
||||||
unzip \
|
|
||||||
vim \
|
|
||||||
wget \
|
|
||||||
ca-certificates \
|
|
||||||
nginx
|
|
|
@ -8,8 +8,6 @@ services:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
volumes:
|
volumes:
|
||||||
- data_ipfs:/data/ipfs
|
- data_ipfs:/data/ipfs
|
||||||
networks:
|
|
||||||
- db_networks
|
|
||||||
db:
|
db:
|
||||||
image: postgres:10.7-alpine
|
image: postgres:10.7-alpine
|
||||||
environment:
|
environment:
|
||||||
|
@ -19,32 +17,24 @@ services:
|
||||||
- PGDATA=/var/lib/postgresql/data/pgdata
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
||||||
volumes:
|
volumes:
|
||||||
- data_postgresql:/var/lib/postgresql/data/pgdata
|
- data_postgresql:/var/lib/postgresql/data/pgdata
|
||||||
networks:
|
|
||||||
- db_networks
|
|
||||||
python:
|
python:
|
||||||
build:
|
build:
|
||||||
context: ./python
|
context: .
|
||||||
entrypoint: bash -c "pip install -r requirements.txt && /code/run_app_prod.sh"
|
dockerfile: ./python/Dockerfile
|
||||||
|
entrypoint: bash -c "/code/run_app_prod.sh"
|
||||||
environment:
|
environment:
|
||||||
- DATABASE_HOST=mazash_db_1.mazash_db_networks
|
- DATABASE_HOST=db
|
||||||
- DATABASE_DB=dejavu
|
- DATABASE_DB=dejavu
|
||||||
- DATABASE_USER=postgres
|
- DATABASE_USER=postgres
|
||||||
- DATABASE_PASSWORD=password
|
- DATABASE_PASSWORD=password
|
||||||
- DATABASE_TYPE=postgres
|
- DATABASE_TYPE=postgres
|
||||||
- IPFS_HOST=/dns/ipfs/tcp/5001
|
- IPFS_HOST=/dns/ipfs/tcp/5001
|
||||||
volumes:
|
|
||||||
- .:/code
|
|
||||||
working_dir: /code
|
|
||||||
ports:
|
ports:
|
||||||
- 5000:5000
|
- 5000:5000
|
||||||
- 8600:8600
|
- 8600:8600
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
- ipfs
|
- ipfs
|
||||||
networks:
|
|
||||||
- db_networks
|
|
||||||
networks:
|
|
||||||
db_networks:
|
|
||||||
volumes:
|
volumes:
|
||||||
data_ipfs:
|
data_ipfs:
|
||||||
data_postgresql:
|
data_postgresql:
|
||||||
|
|
|
@ -7,6 +7,7 @@ RUN apt-get install \
|
||||||
useradd -m app
|
useradd -m app
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --upgrade pip
|
||||||
RUN pip install numpy scipy matplotlib pydub pyaudio psycopg2 uwsgi
|
RUN pip install numpy scipy matplotlib pydub pyaudio psycopg2 uwsgi
|
||||||
RUN mkdir /code && chown app /code
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
|
COPY --chown=1000:1000 . /code
|
||||||
|
RUN pip install -r requirements.txt
|
|
@ -15,7 +15,7 @@ flask_swagger_ui
|
||||||
openapi_spec_validator
|
openapi_spec_validator
|
||||||
|
|
||||||
#dejavu
|
#dejavu
|
||||||
git+git://github.com/worldveil/dejavu@e56a4a221ad204654a191d217f92aebf3f058b62
|
git+https://github.com/worldveil/dejavu@e56a4a221ad204654a191d217f92aebf3f058b62
|
||||||
|
|
||||||
#ipfs
|
#ipfs
|
||||||
git+git://github.com/ipfs-shipyard/py-ipfs-http-client.git@bcec97aa83cf0b0348d8e160c3f68dc8495dbc1b
|
git+https://github.com/ipfs-shipyard/py-ipfs-http-client.git@bcec97aa83cf0b0348d8e160c3f68dc8495dbc1b
|
Loading…
Reference in New Issue