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

19
  web:
20 21 22 23 24 25
    image: go_web
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
    networks:
David Haynes's avatar
David Haynes committed
26
      - go
27
    ports:
28
      - '8000:8000'
David Haynes's avatar
David Haynes committed
29
    command: ./startup.sh
30 31 32 33
    volumes:
      - .:/go
    depends_on:
      - db
mdsecurity's avatar
mdsecurity committed
34
    environment:
David Haynes's avatar
David Haynes committed
35
      - GO_ENV=dev
36 37 38 39 40 41 42 43 44 45 46 47 48
      - GO_ALLOWED_HOSTS=*
      - GO_EMAIL_DOMAIN=@masonlive.gmu.edu
      - GO_DB_NAME=go
      - GO_DB_USER=go
      - GO_DB_PASSWORD=go
      - GO_DB_HOST=db
      - GO_DB_PORT=3306
      - GO_EMAIL_HOST=
      - GO_EMAIL_PORT=
      - GO_EMAIL_HOST_USER=
      - GO_EMAIL_HOST_PASSWORD=
      - GO_EMAIL_FROM=
      - GO_EMAIL_TO=
David Haynes's avatar
David Haynes committed
49
      - SUPERUSER=dhaynes3
50

51
networks:
David Haynes's avatar
David Haynes committed
52
  go: