Search code examples
dockernetworkingdocker-composeoracle-cloud-infrastructure

Use Wallabag instance running on Oracle cloud from anywhere


I am trying to run the Wallabag instance on the Free-Oracle-Cloud tier.

Oracle cloud VM gave me an IP-Address: A.B.C.D

My docker-compose.yml looks like:

version: "3"

services:
  app:
    image: wallabag/wallabag
    container_name: wallabag
    restart: unless-stopped
    healthcheck:
      test:
       [
          "CMD",
          "wget",
          "--no-verbose",
          "--tries=1",
          "--spider",
          "http://localhost",
       ]
      interval: 1m
      timeout: 3s
  environment:
      - SYMFONY__ENV__DOMAIN_NAME=http://127.0.0.1:8012
      - SYMFONY__ENV__SERVER_NAME="My Wallabag Instance"
  ports:
      - 127.0.0.1:8012:80
  volumes:
      - ./data:/var/www/wallabag/data
      - ./images:/var/www/wallabag/web/assets/images

After that I ran: docker-compose up -d

To check the status: docker ps -a | grep wallabag

Output: 4fcadf00db88 wallabag/wallabag "/entrypoint.sh wall…" 9 seconds ago Restarting (1) 1 second ago wallabag

But the thing is I cannot access Wallabag service from the internet. I tried replacing 127.0.0.1 to my IPAddress A.B.C.D

Error:

ERROR: for wallabag Cannot start service app: driver failed programming external connectivity on endpoint wallabag (557e62f6b481d821cd3228a98deaa9cf4e723f0c8ee1ce621bf13): Error starting userland proxy: listen tcp4 A.B.C.D:8012: bind: cannot assign requested address

Any help will be appreciated.


Solution

  •   environment:
          - SYMFONY__ENV__DOMAIN_NAME=http://A.B.C.D:8012
          - SYMFONY__ENV__SERVER_NAME="My Wallabag Instance"
      ports:
          - 8012:80
    

    this should work