docker-compose.yaml 796 Bytes
Newer Older
1
2
3
version: '3'

services:
4
  userdb:
5
    build: ./sql
6
    image: mysql:8.0
7
    container_name: user_db
8
    volumes:
9
         - dbdata:/var/lib/mysql
10
    command: --default-authentication-plugin=mysql_native_password
11
    restart: always
12
    environment:
13
      MYSQL_ROOT_PASSWORD: userRoot
14
15
16
17
18
      MYSQL_DATABASE: userdb
      MYSQL_USER: service_user
      MYSQL_PASSWORD: service_user
    ports:
      - "9906:3306"
19
    expose:
20
21
22
23
      - "9906"
    networks:
      - login_network

24
  web:
25
    build: ./php
26
27
28
    image: php:7.2.2-apache
    container_name: php_web
    depends_on:
29
      - userdb
30
31
32
33
    volumes:
      - ./php/:/var/www/html/
    ports:
      - "8000:80"
34
35
    networks:
      - login_network
36
37
    stdin_open: true
    tty: true
38
39

volumes:
40
41
42
43
44
  dbdata:

networks:
  login_network:
    driver: bridge