github.com/RichardKnop/go-oauth2-server@v1.0.5-0.20201019163316-d02a401490d0/docker-compose.yml (about)

     1  version: "2"
     2  
     3  services:
     4    etcd:
     5      image: quay.io/coreos/etcd
     6      command: etcd --initial-cluster-state new --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://127.0.0.1:2379
     7      volumes:
     8        - "etcd-data:/default.etcd"
     9      environment:
    10        - ETCDCTL_API=3
    11  
    12    etcd_config:
    13      build:
    14        context: .
    15        dockerfile: ./Dockerfile-etcd-config
    16      volumes:
    17        - "etcd-data:/default.etcd"
    18      environment:
    19        - ETCDCTL_API=3
    20        - ETCDCTL_ENDPOINTS=etcd:2379
    21      depends_on:
    22        - etcd
    23      links:
    24        - etcd
    25  
    26    postgres:
    27      image: "postgres"
    28      volumes:
    29        - "db-data:/var/lib/postgresql/data/pgdata"
    30      environment:
    31        PGDATA: "/var/lib/postgresql/data/pgdata"
    32        POSTGRES_USER: "go_oauth2_server"
    33        POSTGRES_PASSWORD: ""
    34        POSTGRES_DB: "go_oauth2_server"
    35        POSTGRES_HOST_AUTH_METHOD: "trust"
    36  
    37    app:
    38      container_name: go_oauth2_server
    39      image: go-oauth2-server:latest
    40      depends_on:
    41        - etcd_config
    42        - postgres
    43      links:
    44        - etcd
    45        - postgres
    46      build:
    47        context: .
    48        dockerfile: ./Dockerfile
    49      ports:
    50        - "8080:8080"
    51      environment:
    52        ETCD_ENDPOINTS: "http://etcd:2379"
    53      command: [runserver]
    54  
    55    app_testdata:
    56      container_name: go_oauth2_server_testdata
    57      image: go-oauth2-server:latest
    58      build:
    59        context: .
    60        dockerfile: ./Dockerfile
    61      environment:
    62        ETCD_ENDPOINTS: "http://etcd:2379"
    63      depends_on:
    64        - etcd_config
    65        - postgres
    66      links:
    67        - etcd
    68        - postgres
    69      command: ["loaddata", "oauth/fixtures/test_clients.yml"]
    70  
    71  volumes:
    72    etcd-data:
    73    db-data: