docker-compose.yml 3.76 KB
Newer Older
1 2 3
version: '3'

services:
4 5 6 7 8 9 10
  nginx-proxy:
   image: jwilder/nginx-proxy
   ports:
     - "443:443"
   volumes:
     - /var/run/docker.sock:/tmp/docker.sock:ro
     - ./config/certs:/etc/nginx/certs
11 12
     - ./config/nginx/epmc_nginx.conf:/etc/nginx/conf.d/epmc_nginx.conf
     - ./config/nginx/default_location:/etc/nginx/vhost.d/default_location
13
   environment:
Nikos Marinos's avatar
Nikos Marinos committed
14
     DEFAULT_HOST: plus.europepmc.org
15

16
  app:
17
    # user: 'node'
Audrey Hamelers's avatar
Audrey Hamelers committed
18
    image: xpubepmc_app:1.5.1
Zhan's avatar
Zhan committed
19
    build:
20
      context: .
21
      dockerfile: ./Dockerfile
Nikos Marinos's avatar
Nikos Marinos committed
22
    command: sh -c "./scripts/wait-for-it.sh postgres:5432 -s -t 40 -- ./wrapperScript.sh"
23 24
    depends_on:
      - postgres
25
      - minio
26 27 28
    environment:
      PGHOST: postgres
      PGUSER: $USER
Nikos Marinos's avatar
Nikos Marinos committed
29
      VIRTUAL_HOST: plus.europepmc.org
30 31
    env_file:
      - .env
32 33
      - .env.minio
      - .env.postgres
34
    volumes:
35
      - ~/logs:/home/xpub/logs
36

Koosum Y Roochun's avatar
Koosum Y Roochun committed
37
  xsweet:
38
    #image: pubsweet/job-xsweet:1.1.0
Koosum Y Roochun's avatar
Koosum Y Roochun committed
39
    image: pubsweet/job-xsweet:1.3.3
40
    command: sh -c "./scripts/wait-for-it.sh postgres:5432 -s -t 40 -- node src/xsweet.js"
Koosum Y Roochun's avatar
Koosum Y Roochun committed
41
    depends_on:
42
      - postgres
Nikos Marinos's avatar
Nikos Marinos committed
43 44
    env_file:
      - .env.postgres
45 46
    volumes:
      - ./scripts/wait-for-it.sh:/home/node/scripts/wait-for-it.sh
Koosum Y Roochun's avatar
Koosum Y Roochun committed
47

48
  postgres:
Nikos Marinos's avatar
Nikos Marinos committed
49
    image: postgres:10.5
50 51 52 53
    environment:
      POSTGRES_USER: $USER
    volumes:
      - postgres-volume:/var/lib/postgresql/data
Nikos Marinos's avatar
Nikos Marinos committed
54
      - ./scripts/xAuditTrigger.sql:/docker-entrypoint-initdb.d/xAuditTrigger.sql
Yuci Gou's avatar
Yuci Gou committed
55
      - ./scripts/shared-data-model.sql:/docker-entrypoint-initdb.d/shared-data-model.sql
56 57
    env_file:
      - .env.postgres
58

Yuci Gou's avatar
Yuci Gou committed
59 60 61 62 63 64 65 66 67
  # pgadmin:
  #   image: dpage/pgadmin4:3.2
  #   environment:
  #     PGADMIN_DEFAULT_EMAIL: "${PGADMIN_DEFAULT_EMAIL:-helpdesk@europepmc.org}"
  #     PGADMIN_DEFAULT_PASSWORD: "${PGADMIN_DEFAULT_PASSWORD:-password}"
  #   depends_on:
  #     - postgres
  #   ports:
  #     - "9080:80"
68

69
  ftpd_server:
Nikos Marinos's avatar
Nikos Marinos committed
70 71 72 73
#    build:
#      context: .
#      dockerfile: ./Dockerfile-ftp
#    command: sh -c "createftpusers.sh"
74 75 76 77 78
    image: stilliard/pure-ftpd:hardened
#    deploy:
#      replicas: 1
#      restart_policy:
#        condition: on-failure
79 80
    environment:
      PUBLICHOST: $LOCALHOST
81 82 83 84 85 86 87 88 89
#      FTP_USER_NAME: "nik"
#      FTP_USER_PASS: "1234"
#      FTP_USER_HOME: "/home/ftpusers/nik"
#      FTP_USER_UID: 33
#      FTP_USER_GID: 33
#    environment:
#      PUBLICHOST: "localhost"
# also for ssl/tls:
#      ADDED_FLAGS: "--tls=2"
Nikos Marinos's avatar
Nikos Marinos committed
90
#    command: /usr/sbin/pure-ftpd -c 30 -C 10 -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P $LOCALHOST -p 30001:30009
91 92
    restart: always
    volumes: # remember to replace /folder_on_disk/ with the path to where you want to store the files on the host machine
93
      - "~/ftpdata:/home/ftpusers/"
94
      - "~/pure-ftp:/etc/pure-ftpd"
Nikos Marinos's avatar
Nikos Marinos committed
95 96
#    env_file:
#      - .env.ftp
97 98 99
    ports:
      - "21:21"
      - "30000-30009:30000-30009"
100

Yuci Gou's avatar
Yuci Gou committed
101
  minio:
102
    image: minio/minio:RELEASE.2018-09-12T18-49-56Z
Yuci Gou's avatar
Yuci Gou committed
103 104 105 106 107 108 109 110 111
    ports:
      - "9000:9000"
    env_file:
      - .env.minio
    volumes:
      - minio_data:/data
      - minio_config:/root/.minio
    command: "server /data"

112 113 114
#  java:
#    image: openjdk:8-jdk-alpine
#    command: java -version
Zhan's avatar
Zhan committed
115 116 117
  #
  # annotator-server:
  #   container_name: annotator-server
Nikos Marinos's avatar
Nikos Marinos committed
118

Zhan's avatar
Zhan committed
119 120 121 122 123 124 125 126
  #   build: ./annotator
  #   ports:
  #     - '4000:3000'
  #   environment:
  #
  #   depends_on:
  #     - postgres
  #   command: sh -c "./scripts/wait-for-it.sh postgres:5432 -s -t 40 -- yarn run start"
Yuci Gou's avatar
Yuci Gou committed
127

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
  samba:
    image: dperson/samba
    environment:
      TZ: 'EST5EDT'
    networks:
      - default
    ports:
      - "137:137/udp"
      - "138:138/udp"
      - "139:139/tcp"
      - "445:445/tcp"
    read_only: true
    tmpfs:
      - /tmp
    restart: unless-stopped
    stdin_open: true
    tty: true
    volumes:
      - ftpdata:/mnt:z
    command: '-s "Data;/mnt"'

networks:
  default:

152 153
volumes:
  postgres-volume:
Yuci Gou's avatar
Yuci Gou committed
154 155
  minio_data: {}
  minio_config: {}
Nikos Marinos's avatar
Nikos Marinos committed
156
  ftpdata: