summaryrefslogtreecommitdiff
path: root/sandcastle/docker-compose.yml
blob: 7049d5520187a1e38a367f69b50b0d91c35cbe2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version: '3' # it's a constant

volumes:
  talerdata:
  talerlogs:

services:
  talerdb:
    build: ./images/postgres
    image: sandcastle_talerdb
    ports:
      - 127.0.0.1:${TALER_DB_PORT}:5432
    volumes:
      - talerlogs:/logs
      - talerdata:/var/lib/postgresql/data/
      - ./config:/config:ro
    environment:
      # root is the only role existing in the DBMS.  That
      # matches the role used by other containers when
      # they connect to the database.
      POSTGRES_USER: root
      # this changes to the password used by other
      # containers to connect here.  This definition
      # only makes the init logic happy.
      POSTGRES_PASSWORD: nonce
      POSTGRES_HOST_AUTH_METHOD: scram-sha-256
      # the final "/postgresql" is used to create
      # a "postgresql" subfolder in the data volume.
      PGDATA: /var/lib/postgresql/data/postgresql
    restart: always

  exchange:
    build: ./images/exchange
    image: sandcastle_exchange
    environment:
      - TOS_AUTHOR="Taler Systems SA"
      - TOS_COPYRIGHT="Taler Systems SA"
      - TOS_PATH=/usr/local/share/taler/terms
      - TOS_INPUT=exchange-tos-v0
      - TOS_LANGUAGE=en
      - TOS_OUTPUT=/usr/local/share/taler/terms/
      - TOS_PAPER=a4
      - TOS_TITLE="GNU Taler terms of service"
    depends_on:
      - talerdb
    ports:
      - 127.0.0.1:${TALER_EXCHANGE_PORT}:80
    volumes:
      - talerlogs:/logs
      - talerdata:/data
      - ${TALER_SANDCASTLE_CONFIG:-./config}:/config:ro
    restart: always

  merchant:
    build: ./images/merchant
    image: sandcastle_merchant
    depends_on:
      - talerdb
    ports:
      - 127.0.0.1:${TALER_MERCHANT_PORT}:80 # backend
      - 127.0.0.1:${TALER_BLOG_PORT}:8080 # blog
      - 127.0.0.1:${TALER_DONATIONS_PORT}:8081 # donations
      - 127.0.0.1:${TALER_SURVEY_PORT}:8082 # survey
      - 127.0.0.1:${TALER_LANDING_PORT}:8083 # landing
      - 127.0.0.1:${TALER_SYNC_PORT}:8084 # sync
    volumes:
      - talerlogs:/logs
      - ${TALER_SANDCASTLE_CONFIG:-./config}:/config:ro
    # uwsgi allocates memory based on available file descriptors, so be
    # conservative here
    ulimits:
      nproc: 5000
      nofile:
        soft: 2000
        hard: 4000
    restart: always

  bank:
    build: ./images/libeufin
    ports:
      - 127.0.0.1:${LIBEUFIN_BANK_PORT}:15000 # libeufin-bank
      - 127.0.0.1:${LIBEUFIN_FRONTEND_PORT}:80 # Nginx serving the SPA
    volumes:
      - talerlogs:/logs
      - talerdata:/data
      - ${TALER_SANDCASTLE_CONFIG:-./config}:/config:ro
    restart: always