docker-compose.yml.example 2.13 KB
Newer Older
1
2
3
4
5
6
7
8
version: '3'

networks:
  doorcode:
    driver: bridge

services:
  webserver:
9
    image: nginx:1-alpine
10
11
12
13
14
15
16
17
    container_name: webserver
    restart: unless-stopped
    tty: true
    ports:
      - "8080:80"
    volumes:
      - ./src/web:/var/www
      - ./nginx/conf.d/:/etc/nginx/conf.d/
Jacob Priddy's avatar
Jacob Priddy committed
18
19
20
21
22
23
24
25
26
      # Saml config
      - ./simplesamlphp-1.18.3:/var/simplesamlphp
      - ./simple-saml/cert:/var/simplesamlphp/cert
      - ./simple-saml/config:/var/simplesamlphp/config
      - ./simple-saml/metadata:/var/simplesamlphp/metadata
      - ./simplesamlphp-1.18.3:/var/simplesamlphp-idp
      - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert
      - ./simple-saml-idp/config:/var/simplesamlphp-idp/config
      - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata
27
28
    networks:
      - doorcode
29
  postgres:
30
    image: postgres:12-alpine
31
    container_name: postgres
32
33
34
    restart: unless-stopped
    tty: true
    ports:
35
      - "5432:5432"
36
    environment:
37
38
39
      POSTGRES_USER: web
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: doorcode
40
41
    networks:
      - doorcode
42
43
44
45
46
47
48
49
  dbadmin:
    image: dockage/phppgadmin:latest
    container_name: dbadmin
    restart: unless-stopped
    tty: true
    ports:
      - "8081:80"
    environment:
50
      PHP_PG_ADMIN_SERVER_HOST: postgres
51
      PHP_PG_ADMIN_SERVER_DEFAULT_DB: doorcode
52
      PHP_PG_ADMIN_SERVER_PORT: 5432
53
54
    networks:
      - doorcode
55
56
57
58
59
60
61
62
  api:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: api
    volumes:
      - ./src/web:/var/www
      - ./php/dev.ini:/usr/local/etc/php/conf.d/local.ini
Jacob Priddy's avatar
Jacob Priddy committed
63
64
65
66
67
68
69
70
71
      # Map saml files to the php-fpm server so it has access to them as well
      - ./simplesamlphp-1.18.3:/var/simplesamlphp
      - ./simple-saml/cert:/var/simplesamlphp/cert
      - ./simple-saml/config:/var/simplesamlphp/config
      - ./simple-saml/metadata:/var/simplesamlphp/metadata
      - ./simplesamlphp-1.18.3:/var/simplesamlphp-idp
      - ./simple-saml-idp/cert:/var/simplesamlphp-idp/cert
      - ./simple-saml-idp/config:/var/simplesamlphp-idp/config
      - ./simple-saml-idp/metadata:/var/simplesamlphp-idp/metadata
72
73
74
75
    ports:
      - "9000:9000"
    networks:
      - doorcode