hint on "sal on docker swarm "

35 views
Skip to first unread message

robu...@gmail.com

unread,
May 11, 2018, 10:31:28 AM5/11/18
to sal-discuss
Hi all,

I was struggeling to run sal in docker swarm (no "--link" directive anymore)

doesn't work, as stated on the site ...

with traefik in my swarm I finally got it running with the compose file below.

... in case someone would have the same question

------

version: "3.6"
services:
  postgres-sal:
    image: grahamgilbert/postgres:9.4.5
    deploy:
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - engine.labels.worker_class==one
      labels:
        - "traefik.frontend.rule=Host:postgres-sal.fancy.name"
        - "traefik.backend=postgres-sal"
        - "traefik.docker.network=traefik_net"
        - "traefik.port=5432"
    volumes:
      - type: bind
        source: /srv/sal/data
        target: /var/lib/postgresql/data
        read_only: false
    networks:
      traefik_net:
        aliases:
          - db

    environment:
      DB_NAME: "sal"
      DB_USER: "admin"
      DB_PASS: "db_password"

  sal:
    depends_on:
      - postgres-sal
    image: macadmins/sal:latest
    deploy:
      restart_policy:
        condition: on-failure
      placement:
        constraints:
          - engine.labels.worker_class==one
      labels:
        - "traefik.frontend.rule=Host:sal.fancy.name"
        - "traefik.backend=sal"
        - "traefik.docker.network=traefik_net"
        - "traefik.port=8000"
    volumes:
      - type: bind
        source: /srv/sal/plugins
        target: /home/docker/sal/plugins
        read_only: false
    networks:
      - traefik_net
    environment:
      ADMIN_PASS: "admin_pass"
      DB_NAME: "sal"
      DB_USER: "admin"
      DB_PASS: "db_password"

networks:
  traefik_net:
    external: true



Graham Gilbert

unread,
May 11, 2018, 10:32:58 AM5/11/18
to sal-d...@googlegroups.com
I would suggest not using the Postgres container in production. It was written for development deployments. Most use RDS or Google’s equivalent.

Sent from my iPhone

From: sal-d...@googlegroups.com <sal-d...@googlegroups.com> on behalf of robu...@gmail.com <robu...@gmail.com>
Sent: Friday, May 11, 2018 7:31:28 AM
To: sal-discuss
Subject: [sal-discuss] hint on "sal on docker swarm "
 
--
You received this message because you are subscribed to the Google Groups "sal-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sal-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages