docker-compose

Unsupported config option for services.db: 'images'

别等时光非礼了梦想. 提交于 2020-04-30 11:41:15
问题 I am trying to learn how to utilize docker-compose and was following instructions until I received an error. Here's my docker-compose file. version: '3.7' services: web: build: ./app command: python /usr/src/app/manage.py runserver 0.0.0.0:8000 volumes: - ./app/:/usr/src/app/ ports: - 8000:8000 environment: - SECRET_KEY=my_secret_key - SQL_ENGINE=django.db.backends.postgresql - SQL_DATABASE=postgres - SQL_USER=postgres - SQL_PASSWORD=postgres - SQL_HOST=db - SQL_PORT=5432 depends_on: - db db:

How to access application run on local mashine from container?

坚强是说给别人听的谎言 提交于 2020-04-30 07:13:28
问题 I have an application run locally and I have a docker container run via docker compose : swagger: image: swaggerapi/swagger-ui:v3.23.5 ports: - "7171:8080" networks: - dockernet expose: - 8080 environment: - URL=http://192.168.10.20:8080/actions/v3/api-docs 192.168.10.20 is my localhost. if I access http://192.168.10.20:8080/actions/v3/api-docs via browser I see the response but swagger service can't access it. How to fix it ? 来源: https://stackoverflow.com/questions/61322256/how-to-access

Nginx up like orphan containers and not working (521 error)

本小妞迷上赌 提交于 2020-04-30 06:42:05
问题 I am using a container Nginx with docker-compose, but It have a bad configuration. When I link the domain to 8000 port I have a 521 error. It is my Dockerfile: FROM nginx COPY nginx.conf /etc/nginx/nginx.conf I used nginx-alpine, but it not working without alpine python, and I had to change it because Pandas not working with alpine. So, my nginx.conf is: user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; ##

Docker: Unable to run .net core api with docker-compose : exited with code 145

♀尐吖头ヾ 提交于 2020-04-30 06:35:06
问题 I am trying to run .net core api in a docker container but I am getting the following error: My first guess looking at the error is that it's because it is not able to find .net core sdk. But as you can see I have included sdk in my dockerfile: FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 Dockerfile FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env WORKDIR /app # Copy csproj and restore as distinct layers COPY *.csproj ./ RUN dotnet restore # Copy everything else and build COPY . ./

can't connect mayan-edms to database in docker-compose.yml

怎甘沉沦 提交于 2020-04-18 05:49:28
问题 I am trying to install the Mayan-EDMS image with the Django app and Postgres database using docker-compose but each time, I try to build docker-compose using docker-compose up it gives an error. mayanedms | Waiting for db:5432 here is my docker-compose.yml docker-compose contain postgres:11.4-alpine,redis:5.0-alpine, mayanedms/mayanedms:3 and django app version: "3" networks: bridge: driver: bridge services: app: container_name: django restart: always build: context: . ports: - "8000:8000"

can't connect mayan-edms to database in docker-compose.yml

不想你离开。 提交于 2020-04-18 05:49:06
问题 I am trying to install the Mayan-EDMS image with the Django app and Postgres database using docker-compose but each time, I try to build docker-compose using docker-compose up it gives an error. mayanedms | Waiting for db:5432 here is my docker-compose.yml docker-compose contain postgres:11.4-alpine,redis:5.0-alpine, mayanedms/mayanedms:3 and django app version: "3" networks: bridge: driver: bridge services: app: container_name: django restart: always build: context: . ports: - "8000:8000"

db contianer is not started after moving data folder

可紊 提交于 2020-04-18 05:46:47
问题 So we had a problem with our Hard disk which contained the data folder for postgres after fixing the problem moved data folder into a new hard disk and change the docker_compose.yml we have following contents in the docker compose file db: image: postgres:9.4 volumes: - /mnt/hdd4/postgresql/data:/var/lib/postgresql/data - ./tmp:/tmp/docker ports: - "5432" now when I we try to start the db container I'm getting following error db_1 | db_1 | PostgreSQL Database directory appears to contain a

docker-compose简单使用

强颜欢笑 提交于 2020-04-18 00:20:55
docker-compose.yaml: nginx: image: nginx links: - tomcat ports: - "80:80" volumes: - /root/conf:/etc/nginx/conf.d:ro tomcat: image: tomcat:8.5 links: - mysql volumes: - /root/tomcat-users.xml:/usr/local/tomcat/conf/tomcat-users.xml - /root/manager.xml:/usr/local/tomcat/conf/Catalina/localhost/manager.xml mysql: image: mysql volumes: - /opt/data:/var/lib/mysql - /root/codepad.sql:/docker-entrypoint-initdb.d/codepad.sql environment: - MYSQL_ROOT_PASSWORD=xxxxxx 注意tomcat的manager默认只有本机能访问,如果需要非本机访问的,需要配置manager.xml,不然访问tomcat控制台会报403,位置在: $CATALINA_BASE/conf/[enginename]/[hostname] ,内容如下: <Context

docker-compose run does not run the entrypoint scripts of dependent services

拜拜、爱过 提交于 2020-04-17 22:16:07
问题 I am trying to run a one time command on my application container using the command docker-compose run --entrypoint="/usr/src/app/migrate.sh" app app is the name of my service and the said entrypoint contains the one-time command that I'm trying to run. Here's my docker-compose.yml file version: '3' services: app: build: . # mount the current directory (on the host) to /usr/src/app on the container, any changes in either would be reflected in both the host and the container volumes: - .:/usr

Docker-compose and mongoDB: Failed to start up WiredTiger under any compatibility version?

假如想象 提交于 2020-04-17 21:25:14
问题 I have the following docker-compose file: version: "3" services: # # APIs #---------------------------------------------- pokerstats: image: pokerstats container_name: pokerstats ports: - 8080:8080 depends_on: - db # # Utilities #---------------------------------------------- db: image: mongo container_name: mongo volumes: - ./data/db:/data/db ports: - "27018:27017" environment: MONGO_INITDB_ROOT_USERNAME: admin MONGO_INITDB_ROOT_PASSWORD: admin MONGO_INITDB_DATABASE: pokerStats This was