Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with docker-compose #39

Open
Fagerinfoco opened this issue May 23, 2021 · 0 comments
Open

Error with docker-compose #39

Fagerinfoco opened this issue May 23, 2021 · 0 comments

Comments

@Fagerinfoco
Copy link

Same issue as AgustinPardo and jscalderon65 are reporting:

web_1 | Unable to connect to ES. Retrying in 5 secs...
web_1 | Unable to connect to ES. Retrying in 5 secs...
web_1 | Unable to connect to ES. Retrying in 5 secs...
web_1 | Out of retries. Bailing out...
web_1 | /usr/local/lib/python3.6/dist-packages/requests/init.py:91: RequestsDependencyWarning: urllib3 (1.26.4) or chardet (3.0.4) doesn't match a supported version!
web_1 | RequestsDependencyWarning)

I have also tried to watch the creation through Portainer logs and am seeing this error:

python3: can't open file 'app.py': [Errno 2] No such file or directory

docker-compose.yml
version: "3"
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
container_name: es
environment:
- discovery.type=single-node
ports:
- 9200:9200
volumes:
- esdata1:/usr/share/elasticsearch/data
web:
image: bfager27/foodtrucks-web
command: python3 app.py
depends_on:
- es
ports:
- 5000:5000
volumes:
- ./flask-app:/opt/flask-app
volumes:
esdata1:
driver: local

Dockerfile:
//# start from base
FROM ubuntu:18.04

LABEL maintainer="Prakhar Srivastav prakhar@prakhar.me"

//# install system-wide deps for python and node
RUN apt-get -yqq update
RUN apt-get -yqq install python3-pip python3-dev curl gnupg
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash
RUN apt-get install -yq nodejs

//# copy our application code
ADD flask-app /opt/flask-app
WORKDIR /opt/flask-app

//# fetch app specific deps
RUN npm install
RUN npm run build
RUN pip3 install -r requirements.txt

//# expose port
EXPOSE 5000

//# start app
CMD [ "python3", "./app.py" ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant