summaryrefslogtreecommitdiff
path: root/docker/integration_test/docker-compose.yaml
blob: cd832bef1911dc94dfebaf0fa37a224c83fbc722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
  openldap:
    image: bitnami/openldap:latest
    ports:
      - '1389'
      - '1636'
    environment:
      - LDAP_ADMIN_USERNAME=admin
      - LDAP_ADMIN_PASSWORD=adminpassword
      - LDAP_USERS=user01,user02,user03
      - LDAP_PASSWORDS=password1,password2,password3
    volumes:
      - 'it_openldap_data:/bitnami/openldap'
  mariadb:
    image: mariadb:latest
    ports:
      - '3306'
    environment:
      - MARIADB_USER=eyeballs
      - MARIADB_PASSWORD=secret
      - MARIADB_DATABASE=eyeballs
      - MARIADB_RANDOM_ROOT_PASSWORD=1
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      start_period: 10s
      interval: 10s
      timeout: 5s
      retries: 3
    volumes:
      - 'it_mariadb_data:/var/lib/mysql'
  remote_git:
    image: rockstorm/git-server:latest
    environment:
      - SSH_AUTH_METHODS=publickey
    ports:
      - '12222:22'
    volumes:
      - './web/gitkey.pub:/home/git/.ssh/authorized_keys'
      - 'it_remote_git:/srv/git'
  local_git:
    image: rockstorm/git-server:latest
    environment:
      - SSH_AUTH_METHODS=publickey
    depends_on:
      web:
        condition: service_healthy
    ports:
      - '10022:22'
    volumes:
      - 'it_git_auth:/home/git/.ssh'
      - 'it_git_repos:/srv/git'
  web:
    build:
      context: ../../
      dockerfile: ./docker/integration_test/web/Dockerfile
    depends_on:
      openldap:
        condition: service_started
      mariadb:
        condition: service_healthy
    environment:
      - LDAP_URL=ldap://openldap:1389
      - DB_URL=mysql://eyeballs:secret@mariadb:3306/eyeballs
    ports:
      - '18000:8000'
    volumes:
      - 'it_git_auth:/git/auth'
      - 'it_git_repos:/git/repos'

volumes:
  it_openldap_data:
    driver: local
  it_mariadb_data:
    driver: local
  it_remote_git:
    driver: local
  it_git_auth:
    driver: local
  it_git_repos:
    driver: local