docker-compose

how to do reverse proxy on docker

流过昼夜 提交于 2021-02-05 11:13:07
问题 I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let's call the website http://mywebsite.com . The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1 and I want to establish an MQTT connection via mosquitto and I'm sending the data on topic test The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works But if I change the IP

how to do reverse proxy on docker

强颜欢笑 提交于 2021-02-05 11:12:55
问题 I have a server and I am using Ubuntu 20.04, nginx , mosquitto and node-red and docker , let's call the website http://mywebsite.com . The problem that I am facing that I have created a client lets call it client1 in docker so the URL will be http://mywebsite.com/client1 and I want to establish an MQTT connection via mosquitto and I'm sending the data on topic test The problem that on node red node of MQTT when I write the IP address of my mosquitto container it works But if I change the IP

docker-compose java application connection to mongodb

佐手、 提交于 2021-02-05 09:37:20
问题 2 Containers, one Java application and the second mongodb. If I run my java app locally and mongodb in a container, it connects but if both run inside a container, java app can't connect to mongodb. docker-compose file is as follows, am I missing something version: "3" services: user: image: jboss/wildfly container_name: "user" restart: always ports: - 8081:8080 - 65194:65193 volumes: - ./User/target/User.war:/opt/jboss/wildfly/standalone/deployments/User.war environment: - JAVA_OPTS=

Failed to read environment variables from the file declared in env_file

坚强是说给别人听的谎言 提交于 2021-02-05 08:10:55
问题 In my docker-compose.yml, I defined two services, app and db . version: "3.7" services: app: image: my_app container_name: my-app ports: - ${MY_PORT}:${MY_PORT} env_file: - ./app.env ... depends_on: - db environment: - DATABASE_URL=${DB_URL} db: image: my_db container_name: my-db env_file: - ./db.env ports: - ${DB_PORT}:${DB_PORT} As you can see above, I have defined two env files, app.env and db.env in the env_file option of app and db services. app.env: MY_PORT=8081 db.env: DB_PORT=4040 DB

“The connection was reset” in localhost:8000 using django and docker

徘徊边缘 提交于 2021-02-05 06:39:27
问题 After running docker-compose up , Starting docker_django ... done Attaching to docker_django docker_django | Watching for file changes with StatReloader docker_django | Performing system checks... docker_django | System check identified no issues (0 silenced). docker_django | February 12, 2020 - 07:26:35 docker_django | Django version 3.0.3, using settings 'backend.settings' docker_django | Starting development server at http://127.0.0.1:8000/ docker_django | Quit the server with CONTROL-C.

“The connection was reset” in localhost:8000 using django and docker

喜你入骨 提交于 2021-02-05 06:38:05
问题 After running docker-compose up , Starting docker_django ... done Attaching to docker_django docker_django | Watching for file changes with StatReloader docker_django | Performing system checks... docker_django | System check identified no issues (0 silenced). docker_django | February 12, 2020 - 07:26:35 docker_django | Django version 3.0.3, using settings 'backend.settings' docker_django | Starting development server at http://127.0.0.1:8000/ docker_django | Quit the server with CONTROL-C.

How to populate a Mysql docker container during build of another container?

删除回忆录丶 提交于 2021-02-05 05:30:10
问题 I am trying to build a docker-compose file that automatically builds a container for my application and a mysql-container that stores all the data. Within my dockerfile for my application I have a script, that sets up all the database tables and preset values, that are necessary for the application to run. Is it possible to somehow pass the reference of the mysql container to myapplication that during build of myapplication it can access the mysql container? If so, how can I do that, and if

docker-compose.yml file naming convention [closed]

牧云@^-^@ 提交于 2021-02-04 21:59:56
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . Improve this question What is the naming convention for the docker-compose.yml file? Should it always be named like this or am I free to rename it to, for instance, docker-compose-jenkins.yml ? 回答1: default name: Note that docker-compose.yml is the default name so if you want

How to deploy multiple MEAN app containers to Azure using Docker-Compose

不羁的心 提交于 2021-02-04 20:59:46
问题 I am pretty new to docker. I am trying to deploy a MEAN app (Angular frontend, Node.js/Express backend, and MongoDB) to Azure using Docker-Compose. Locally the multi container environment works as expected. The front-end connects to the back-end web api and db as expected. When I deploy the image to Azure the front-end cannot connect to the back-end web api's. The error in the browser console is: OPTIONS http://localhost:3000/api/dosa net::ERR_CONNECTION_REFUSED Angular Docker file FROM node

How to deploy multiple MEAN app containers to Azure using Docker-Compose

醉酒当歌 提交于 2021-02-04 20:59:38
问题 I am pretty new to docker. I am trying to deploy a MEAN app (Angular frontend, Node.js/Express backend, and MongoDB) to Azure using Docker-Compose. Locally the multi container environment works as expected. The front-end connects to the back-end web api and db as expected. When I deploy the image to Azure the front-end cannot connect to the back-end web api's. The error in the browser console is: OPTIONS http://localhost:3000/api/dosa net::ERR_CONNECTION_REFUSED Angular Docker file FROM node