aboutsummaryrefslogtreecommitdiff
path: root/contrib/prod/docker-compose.yml
blob: 167301b204cd11157469e2dc9d805009a33b34bd (plain) (blame)
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
version: '3.3'

services:
  db:
    image: postgres
    shm_size: 128mb
    env_file: .env
    volumes:
      - data:/var/lib/postgresql/data
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U shorg -d shorg" ]
      interval: 30s
      timeout: 30s
      retries: 5
    restart: unless-stopped
  app:
    image: gitrepo.ru/neonxp/shorg:latest
    volumes:
      - config:/config
    command: serve -config=/config/prod.yaml
    depends_on:
      db: 
        condition: service_healthy
    ports:
      - 8093:8000
    restart: unless-stopped
  migration:
    image: gitrepo.ru/neonxp/shorg:latest
    volumes:
      - config:/config
    command: db migrate -config=/config/prod.yaml
    depends_on:
      db: 
        condition: service_healthy
volumes:
  data:
  config: