summary refs log tree commit diff
path: root/docker-compose.yml
blob: 3dca75fb29b676c02b773332e775a0a95d4184b4 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
version: "3"

services:
    db:
        hostname: fosscord_db
        image: postgres:latest
        volumes:
            - db_data:/var/lib/postgres
        restart: unless-stopped
        ports:
            - 5432:5432
        environment:
            POSTGRES_USER: fosscord
            POSTGRES_DATABASE: fosscord
            POSTGRES_PASSWORD: fosscord

    api:
        build:
            context: .
            dockerfile: api/Dockerfile
        depends_on:
            - db
        ports:
            - 3001:3001
        env_file: .env

    gateway:
        build:
            context: .
            dockerfile: gateway/Dockerfile
        depends_on:
            - db
        ports:
            - 3002:3002
        env_file: .env

    cdn:
        build:
            context: .
            dockerfile: cdn/Dockerfile
        depends_on:
            - db
        ports:
            - 3003:3003
        volumes:
            - cdn_data:/data
        env_file: .env

volumes:
    db_data: {}
    cdn_data: {}