docker-compose.yml.example 1.14 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
18
19
    container_name: webserver
    restart: unless-stopped
    tty: true
    ports:
      - "8080:80"
    volumes:
      - ./src/web:/var/www
      - ./nginx/conf.d/:/etc/nginx/conf.d/
    networks:
      - doorcode
20
  postgres:
21
    image: postgres:12-alpine
22
    container_name: postgres
23
24
25
    restart: unless-stopped
    tty: true
    ports:
26
      - "5432:5432"
27
    environment:
28
29
30
      POSTGRES_USER: web
      POSTGRES_PASSWORD: secret
      POSTGRES_DB: doorcode
31
32
    networks:
      - doorcode
33
34
35
36
37
38
39
40
  dbadmin:
    image: dockage/phppgadmin:latest
    container_name: dbadmin
    restart: unless-stopped
    tty: true
    ports:
      - "8081:80"
    environment:
41
      PHP_PG_ADMIN_SERVER_HOST: postgres
42
      PHP_PG_ADMIN_SERVER_DEFAULT_DB: doorcode
43
      PHP_PG_ADMIN_SERVER_PORT: 5432
44
45
    networks:
      - doorcode
46
47
48
49
50
51
52
53
54
55
56
57
  api:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: api
    volumes:
      - ./src/web:/var/www
      - ./php/dev.ini:/usr/local/etc/php/conf.d/local.ini
    ports:
      - "9000:9000"
    networks:
      - doorcode