I am trying to convert a docker compose file to a kubernetes manifest for deployment and after installing the Kompose on my system, I used the command kompose convert -f docker-compose.yml for the conversion process but it is not working. The error response is ←[31mFATA←[0m services.web.stdin_open must be a boolean.
The docker-compose file is shown thus:
version: '3'
services:
# Backend / Database
database:
image: database
build: ../backend/database
volumes:
- ../backend/database:/data/db
restart: always
networks:
- back
# Backend / API
api:
image: api
build: ../backend/api
volumes:
- ../backend/api/public:/user/src/app/public
restart: always
ports:
- "8084:8080"
depends_on:
- database
networks:
- front
- back
# Backend / Proxy
proxy:
image: nginx
volumes:
- ../backend/proxy/nginx.conf:/etc/nginx/conf.d/proxy.conf
restart: always
ports:
- "80:80"
- "443:443"
depends_on:
- database
- api
networks:
- front
- docker-network
# Frontend / App / Web
web:
image: web
stdin_open: "true"
build: ../frontend/app/web
restart: always
ports:
- "3000:3000"
depends_on:
- api
networks:
- front
networks:
front:
driver: bridge
back:
driver: bridge
docker-network:
driver: bridge
Please I'd like help on how I can avoid this error and build the manifest file. I am running this on a windows machine. Also a screenshot of the error is shown in the image attached.
screenshot of error
Many Thanks.
Change stdin_open to true instead of ”true”
services:
web:
stdin_open: true
Related
Im trying to deploy with docker compose an app; mi yml is:
version: '3.9'
services:
db:
image: mongo
restart: always
volumes:
- 'dbdata:/data/db'
container_name: database
server:
build: .
restart: always
ports:
- '2000:2000'
depends_on:
- db
container_name: api
links:
- database
frontend:
build: ./client
restart: always
ports:
- '3000:3000'
depends_on:
- server
container_name: client
links:
- api
volumes:
dbdata:
When i docker compose up -d this in my PC it works correctly, but when i do the same thing in a oracle linux 8.6 fedora; seems like is working fine until came to the lines:
Network soccer_default Created
no such service: database
And stop the process. Is something related with the machine or docker version?
I'm trying to set up 2 docker containers with docker-compose, 1 is a Traefik proxy and the other is a Vikunja kanban board container.
They both have their own docker-compose file. I can start the containers and the Traefik dashboard doesn't show any issues but when I open the URL in a browser I only get a Gateway Timeout error.
I have been looking at similar questions on here and different platforms and in nearly all other cases the issue was that they were placed on 2 different networks. However, I added a networks directive to the Traefik docker-compose.yml and still have this problem, unless I'm using them wrong.
The docker-compose file for the Vikunja container
(adapted from https://vikunja.io/docs/full-docker-example/)
version: '3'
services:
api:
image: vikunja/api
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: REDACTED
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_JWTSECRET: REDACTED
VIKUNJA_SERVICE_FRONTENDURL: REDACTED
volumes:
- ./files:/app/vikunja/files
networks:
- web
- default
depends_on:
- db
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.vikunja-api.rule=Host(`subdomain.domain.de`) && PathPrefix(`/api/v1`, `/dav/`, `/.well-known/`)"
- "traefik.http.routers.vikunja-api.entrypoints=websecure"
- "traefik.http.routers.vikunja-api.tls.certResolver=myresolver"
frontend:
image: vikunja/frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.vikunja-frontend.rule=Host(`subdomain.domain.de`)"
- "traefik.http.routers.vikunja-frontend.entrypoints=websecure"
- "traefik.http.routers.vikunja-frontend.tls.certResolver=myresolver"
networks:
- web
- default
restart: unless-stopped
db:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: REDACTED
MYSQL_USER: vikunja
MYSQL_PASSWORD: REDACTED
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
command: --max-connections=1000
networks:
- web
networks:
web:
external: true
The network directives for the api and frontend services in the Vikunja docker-compose.yml were present in the template (I added one for the db service for testing but it didn't have any effect).
networks:
- web
After getting a docker error about the network not being found I created it via docker network create web
The docker-compose file for the Traefik container
version: '3'
services:
traefik:
image: traefik:v2.8
ports:
- "80:80"
- "443:443"
- "8080:8080" # dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt:/letsencrypt
- ./traefik.http.yml:/etc/traefik/traefik.yml
networks:
- web
networks:
web:
external: true
I've tried adding the Traefik service to the Vikunja docker-compose.yml in one file but that didn't have any effect either.
I'm thankful for any pointers.
For debugging you could try to configure all container to use the host network to enusre they are realy on the same netwok.
i had a similar issue trying to run two different dockers and getting a
"Gateway Timeout". My issue was solved after changing the mapping in the second docker for traefik and accessing the site with :84 at the end (http://sitename:84)
traefik:
image: traefik:v2.0
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
ports:
- '84:80'
- '8084:8080'
I have configured the drupal docker container along with the webserver using below-mentioned steps on rhel 8 server using podman docker.
My docker-compose file:
version: "3"
services:
drupal:
image: drupal:9.2.7-php8.0-fpm-alpine
container_name: drupal
restart: unless-stopped
networks:
- internal
- external
webserver:
image: nginx:1.21.3
container_name: webserver
depends_on:
- drupal
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./drupal-data:/var/www/html
- ./nginx-conf:/etc/nginx/conf.d
networks:
- external
networks:
external:
driver: bridge
internal:
driver: bridge
volumes:
drupal-data:
db-data:
If I enter commands manually on the server end, I get the correct response properly but Can't get any response from the browser.
As below response getting from server end,
Could you please suggest the solution for this issue why didn't get any response on the browser, and how to fix this issue?
I need help. I have an expressjs REST API that uplodas files using multer running in a container using docker-compose, and another front end app on another container. How can i access the uploaded files from the front end?
version: '2'
services:
api:
container_name: "api"
restart: always
build:
context: ./api
ports:
- "8383:8383"
environment:
- test=testvalue
networks:
- pms
app:
container_name: "app"
restart: always
build:
context: ./app
ports:
- "7777:80"
environment:
- test=testvalue
networks:
- pms
networks:
pms:
I am trying to create a Docker for a PHP project. I am stuck on mapping nginx to my project files.
In my project folder root i have dockerfile, and docker-composer.yml. I also have a application folder, which contains my PHP files. (Correct setup?)
When i run docker-compose up -d and go to localhost, it just shows the default homepage for nginx (Welcome to nginx!) :'(
You can see my docker-compose.yml here.
docker-compose.yml:
version: '3.3'
services:
nginx:
image: nginx
ports:
- "80:80"
volumes:
- ./application:/var/www/html
networks:
- app
php:
image: php:7.1-cli
volumes:
- ./application:/var/www/html
networks:
- app
db:
image: mariadb:10.2
networks:
- app
volumes:
- db_data:/var/lib/mysql
networks:
app:
driver: bridge
volumes:
db_data: