docker-compose

Dockerized Spring boot app connect to database docker image

人盡茶涼 提交于 2021-02-08 08:48:35
问题 I have a basic spring boot application with gradle which makes calls to an Oracle database and the database properties are specified in an application.properties file. I created a Docker image of the spring boot application with the plugin "com.google.cloud.tools.jib" and using the following command: ./gradlew jibDockerBuild --image=app1 I have a docker-compose file in which i specify the image as an service and i want the application to start when i run the command: "docker-compose up" The

Configure NGINX reverse proxy with browser WebSocket and docker-compose

大兔子大兔子 提交于 2021-02-08 08:20:34
问题 I am trying to get nginx to proxy a websocket connection to a backend server. All services linked via docker-compose. When i create the WebSocket object in my frontend react app: let socket = new WebSocket(`ws://engine/socket`) I get the following error: WebSocket connection to 'ws://engine/socket' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED I believe the problem comes from converting ws:// to http:// and that my nginx configuration does not seem to be pick up the

Docker: Strange behaviour of bind mount

99封情书 提交于 2021-02-08 07:42:35
问题 I have a compose file: version: "3" services: db: image: postgres:12.5 ports: - "15432:5432" restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: test volumes: - ./postgres-data:/var/lib/postgresql/data backend: image: backend depends_on: - db restart: always ports: - "6969:8000" volumes: - ./app:/app When I run docker-compose up to start the 2 containers, I notice that: Docker auto creates the directory postgres-data, and it transfers the content of

Schedule Azure VM to turn on, run a script and turn off

白昼怎懂夜的黑 提交于 2021-02-08 07:23:49
问题 I have a multi-container app that I need to run twice a day at specific times for about 30 mins each time. To save costs, I would like to: Turn on a Linux VM on Microsoft Azure Run a script that runs docker-compose up -d , waits 30 mins, then calls docker-compose stop Turn off the VM I'd love for this to happen automatically on a cron schedule. So far, I've failed to find any Azure solution that can do all of this. Azure automation allows you to turn on/off VMs but it doesn't allow you to run

Docker: Permission denied when PHP upload file to mounted data volume

主宰稳场 提交于 2021-02-08 04:30:11
问题 I'm using docker quickstart terminal on Win10 . Client: Version: 17.06.0-ce, API version: 1.30 Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:30:30 2017 OS/Arch: windows/amd64 I have a simple document upload php script that saves an uploaded document to a file location called '/uploads'. I want to make the '/uploads' folder a volume attached to the php:apache container, so i can easily share the contents with the python back-end. I'm using the following docker-compose.yml file

Docker nginx reverse proxy returns 502 bad gateway “connection refused while connecting to upstream”

∥☆過路亽.° 提交于 2021-02-08 04:01:18
问题 I'm trying to set up nginx reverse proxy in a container to another container where my app is running. Here is my nginx.conf: daemon off; user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x

Spring Cloud Config in Docker container is not accessible

家住魔仙堡 提交于 2021-02-08 03:41:20
问题 I have a relatively simple setup. A Spring Could Config server, and a Spring Cloud Eureka server. (I refer Eureka server as Discover everywhere in my config...) The config server uses a Git repository for finding the appropriate config. Everything is in Docker containers. I use docker-compose to build my services. The Gateway server should wait for config server to come up. I'll provide the source of the file further down. So, when I build and start the containers, the discovery (Eureka)

AWS ECS Production Docker Deployment

风格不统一 提交于 2021-02-07 21:47:15
问题 I've recently started using Docker for my own personal website. So the design my website is basically Nginx -> Frontend -> Backend -> Database Currently, the database is hosted using AWS RDS. So we can leave that out for now. So here's my questions I currently have my application separated into different repository. Frontend and Backend respectively. Where should I store my 'root' docker-compose.yml file. I can't decide to store it in either the frontend/backend repository. In a docker

MongoDB no space left on device with docker

爷,独闯天下 提交于 2021-02-07 20:15:52
问题 My MongoDB gets stuck and returning the following error: 2019-01-28T18:28:53.419+0000 E STORAGE [WTCheckpointThread] WiredTiger error (28) [1548700133:419188][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: /data/db/WiredTiger.turtle.set: handle-open: open: No space left on device 2019-01-28T18:28:53.419+0000 E STORAGE [WTCheckpointThread] WiredTiger error (22) [1548700133:419251][1:0x7feecb0ae700], file:WiredTiger.wt, WT_SESSION.checkpoint: WiredTiger.wt: the checkpoint failed,

Cannot run Strapi with Docker

混江龙づ霸主 提交于 2021-02-07 19:51:21
问题 I'm trying to Dockerize my Strapi application, so first all in the root directory of the project I have created an .env file which contains the following: HOST=0.0.0.0 PORT=3002 then, inside backend/config/server.js I have: module.exports = ({ env }) => ({ host: env("HOST", "0.0.0.0"), port: env.int("PORT"), admin: { auth: { secret: env("ADMIN_JWT_SECRET", "3b8efb990e54568fc0d91ff31390cda7"), }, }, }); this code is supposed to bind the application to 0.0.0.0 . Infact, when I run the container