aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: a3f011e06625677c457a8a35c909e8033d53183b (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
version: '3'
services:
  thulani:
    image: thulani
    build: .
    depends_on:
      - db
      - migrate

    environment:
      DATABASE_URL: "postgres://thulani:clickheretodie@db/memes"
      RUST_BACKTRACE: 1

  db:
    image: postgres:latest
    restart: always
    volumes:
      - db-data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: thulani
      POSTGRES_PASSWORD: clickheretodie
      POSTGRES_DB: memes

  migrate:
    build:
      context: .
      dockerfile: Dockerfile-migrate
    restart: on-failure
    depends_on:
      - db

volumes:
  db-data: