-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.3 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
version: '3'
services:
api:
image: node:16
hostname: helpkb_api
ports:
- 4000:4000
volumes:
- ./api:/usr/local/app
depends_on:
- db
restart: always
working_dir: /usr/local/app
entrypoint: "/bin/bash"
command: "-c \"if [ ! -d \"node_modules\" ]; then npm i; fi; node app.js\""
environment:
# Set environment variables: https://github.com/vercel/next.js/discussions/15651
- NODE_ENV=development
- SESSION_SECRET=random-string
- GITHUB_CLIENT_ID=github-client-id
- GITHUB_SECRET=github-secret
- NEXT_PUBLIC_GITHUB_CLIENTID=github-client-id
db:
image: postgres
hostname: helpkb_db
command: -p 5432
ports:
- 5432
environment:
POSTGRES_DB: helpkb-test
POSTGRES_PASSWORD: helpkb
POSTGRES_USER: postgres
nginx:
build:
context: .
dockerfile: Dockerfile-nginx
depends_on:
- db
- api
- ui
ports:
- 80:80
ui:
hostname: helpkb_ui
build:
context: .
dockerfile: Dockerfile
volumes:
- /app
command: npm run dev:ui
depends_on:
- api
- db
ports:
- 3000:3000
environment:
- NODE_ENV=development
- HOST_NAME=http://localhost:3000
- NEXT_PUBLIC_BASE_URL=http://localhost:3000