-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
107 lines (107 loc) · 2.5 KB
/
docker-compose.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "3.7"
services:
reverse-proxy:
container_name: reverse-proxy
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedByDefault=false"
ports:
# HTTP Port
- "80:80"
# Web UI
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
postgres-timber:
container_name: pgres
image: "postgres"
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
- POSTGRES_DB=${DB_NAME}
volumes:
- "pgdata_timber:/var/lib/postgresql/data"
command:
[
"postgres",
"-c",
"log_statement=mod",
"-c",
"log_min_error_statement=ERROR",
]
redis-timber:
container_name: rdis
image: "redis:alpine"
command: >
--requirepass ${REDIS_PASS}
ports:
- "6379:6379"
volumes:
- "rdbdata_timber:/data"
timber-api:
command: modd
container_name: timber-api
image: timber-api
build:
context: ./api
target: dev
volumes:
- "./api:/app"
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASS: ${DB_PASS}
DB_NAME: ${DB_NAME}
API_URL: ${API_URL}
AUTH_KEY: ${AUTH_KEY}
BASE_URL: ${BASE_URL}
REDIS_ADDRESS: ${REDIS_ADDRESS}
REDIS_PORT: ${REDIS_PORT}
REDIS_PASS: ${REDIS_PASS}
OAUTH_GOOGLE_ID: ${OAUTH_GOOGLE_ID}
OAUTH_GOOGLE_SECRET: ${OAUTH_GOOGLE_SECRET}
OAUTH_GITHUB_ID: ${OAUTH_GITHUB_ID}
OAUTH_GITHUB_SECRET: ${OAUTH_GITHUB_SECRET}
expose:
- "8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.timber-api.rule=Host(`${HOST}`) && PathPrefix(`/api`)"
volumes:
- ./api:/go/src/app
depends_on:
- postgres-timber
- redis-timber
- reverse-proxy
timber-client:
container_name: timber-client
build:
context: ./ui
target: dev
image: timber-client
command: npm start
stdin_open: true
environment:
BASE_URL: ${BASE_URL}
PROJECT_GITHUB_URL: ${PROJECT_GITHUB_URL}
PROJECT_MOTTO: ${PROJECT_MOTTO}
FOOTER_TEXT: ${FOOTER_TEXT}
expose:
- "3000"
- "1234"
ports:
- "1234:1234"
labels:
- "traefik.enable=true"
- "traefik.http.routers.timber-client.rule=Host(`${HOST}`)"
volumes:
- ./ui:/app
- /app/node_modules
volumes:
pgdata_timber:
rdbdata_timber: