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

compose problem #15

Open
caglaryalcin opened this issue Nov 17, 2024 · 3 comments
Open

compose problem #15

caglaryalcin opened this issue Nov 17, 2024 · 3 comments

Comments

@caglaryalcin
Copy link

caglaryalcin commented Nov 17, 2024

Hi,
What is the problem with the following compose file? The container stands up, but I can't access it through port 3541.

services:
  submanager:
    image: dh1011/subscription-manager:latest
    container_name: subs-manager
    ports:
      - 3541:3000
    environment:
      NODE_ENV: production
      HOST: 0.0.0.0
    volumes:
      - /docker/submanager/subscriptions.db:/app/subscriptions.db:rw
    restart: on-failure:5
    networks:
      - subscription_network

networks:
  subscription_network:
    name: subscription
    ipam:
      config:
        - subnet: 172.53.0.0/24

Container logs:

> [email protected] dev
> concurrently "npm run server" "npm run client"
[0] 
[0] > [email protected] server
[0] > node server/server.js
[0] 
[1] 
[1] > [email protected] client
[1] > react-scripts start
[1] 
[0] Using subscriptions database located at: /app/server/subscriptions.db due to baseDir: /app/server
[0] Server running on port 5000
[0] Database initialized successfully with new table for user configuration.
[1] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
[1]  - options.allowedHosts[0] should be a non-empty string.
[1] npm run client exited with code 1
@caglaryalcin
Copy link
Author

i think the problem is related to the network setting custom. when i delete the network parts i have no problem. but i still don't understand why.

@CopyAce
Copy link

CopyAce commented Nov 18, 2024

Shouldn't it be,

networks:
subscription_network:
the name: subscription_network

@caglaryalcin
Copy link
Author

In about 100 compose files I use, I use the network part in the way I described :)

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

2 participants