docker-compose.yml 1.18 KB
Newer Older
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
version: '3'
services:
  api:
    build:
      context: .
      dockerfile: ./src/main/docker/Dockerfile.jvm
    ports:
      - "8090:8090"
    environment:
      - VIRTUAL_HOST=api.eclipse.docker
      - CONFIG_SECRET_PATH=/var/run/secrets/secret.properties
      - VIRTUAL_PORT=8090
    volumes:
      - ./config/secret.properties:/var/run/secrets/secret.properties
    deploy:
      restart_policy:
        condition: on-failure
        max_attempts: 5
      resources:
        limits:
          cpus: '0.5'
          memory: 256M
        reservations:
          cpus: '0.01'
          memory: 192M
    depends_on:
      - mariadb
  mariadb:
    image: mariadb:latest
    command: --max_allowed_packet=100000000
    ports:
      - '3306:3306'
    environment:
34
      MYSQL_ROOT_PASSWORD: ${DOWNLOADS_MYSQL_PASSWORD}
35
36
37
38
39
40
41
42
43
44
45
46
47
      MYSQL_DATABASE: eclipse
    volumes:
      - ./config/mariadb/ddl.sql:/docker-entrypoint-initdb.d/ddl.sql
      - ./volumes/mariadb:/var/lib/mysql
  nginx-proxy:
    image: jwilder/nginx-proxy
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - ./certs:/etc/nginx/certs
      - ./config/docker/vhost.d:/etc/nginx/vhost.d:ro