docker-compose.yml 861 Bytes
Newer Older
David Haynes's avatar
David Haynes committed
1
version: '3'
2
services:
David Haynes's avatar
David Haynes committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  db:
    image: mysql
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    networks:
      - wopen_net
    ports:
      - "3306:3306"
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
      MYSQL_DATABASE: wopen
      MYSQL_USER: wopen
      MYSQL_PASSWORD: wopen

  api:
    image: whats-open-api
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    networks:
      - wopen_net
27
28
    ports:
      - '8000:8000'
David Haynes's avatar
David Haynes committed
29
    command: /bin/bash ./startup.sh
30
    volumes:
David Haynes's avatar
David Haynes committed
31
      - .:/whats-open
David Haynes's avatar
David Haynes committed
32
    depends_on:
David Haynes's avatar
David Haynes committed
33
      - db
David Haynes's avatar
David Haynes committed
34
35
36
37
38
    environment:
      - WOPEN_EMAIL_DOMAIN=@masonlive.gmu.edu
      - WOPEN_DB_NAME=wopen
      - WOPEN_DB_USER=wopen
      - WOPEN_DB_PASSWORD=wopen
David Haynes's avatar
David Haynes committed
39
      - WOPEN_DB_HOST=db
David Haynes's avatar
David Haynes committed
40
41
      - WOPEN_DB_PORT=3306
      - WOPEN_SUPERUSER=admin
David Haynes's avatar
David Haynes committed
42
43
44

networks:
  wopen_net: