-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
118 lines (107 loc) · 2.79 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
108
109
110
111
112
113
114
115
116
117
118
services:
app:
command:
- /bin/sh
- -c
- npm start
build: ./
ports:
- 8000:8000
environment:
- NODE_ENV=development # production || development
- POSTGRES_HOST=postgres
- POSTGRES_DB=openlab-scheduler
- POSTGRES_USER=bsnmysql
- POSTGRES_PASSWORD=bcitbsn491
- TZ=America/Vancouver
- JWT_AUTH_SIGNING_KEY=insecureT0kenSigningKey
depends_on:
postgres:
condition: service_healthy
volumes:
- .:/app
postgres:
image: postgres
environment:
POSTGRES_USER: bsnmysql
POSTGRES_PASSWORD: bcitbsn491
POSTGRES_DB: openlab-scheduler
healthcheck:
test: "pg_isready -U bsnmysql -d openlab-scheduler"
timeout: 10s
retries: 10
interval: 5s
start_period: 10s
volumes:
- api_db:/var/lib/postgresql/data
# jsdocs:
# image: node:21-alpine
# command:
# - /bin/sh
# - -c
# - |
# ./node_modules/.bin/jsdoc -c ./jsdoc.conf.json -r
# working_dir: /build
# volumes:
# - .:/build
# depends_on:
# app:
# condition: service_started
# testing:
# image: node:21-alpine
# command:
# - /bin/sh
# - -c
# - |
# npm run test --detectOpenHandles
# working_dir: /test
# ports:
# - 8001:8001
# environment:
# # - NODE_ENV=development
# - NODE_ENV=test
# # - NODE_ENV=production
# - POSTGRES_HOST=postgres
# - POSTGRES_DB=openlab-scheduler
# - POSTGRES_USER=bsnmysql
# - POSTGRES_PASSWORD=bcitbsn491
# - TZ=America/Vancouver
# - JWT_AUTH_SIGNING_KEY=insecureT0kenSigningKey
# - DATABASE_URL=postgres://bsnmysql:bcitbsn491@postgres:5432/openlab-scheduler
# depends_on:
# postgres:
# condition: service_healthy
# volumes:
# - .:/test
adminer:
image: adminer
ports:
- 8080:8080
environment:
- ADMINER_DEFAULT_DRIVER=pgsql
- ADMINER_DEFAULT_SERVER=postgres
- ADMINER_DEFAULT_DB=openlab-scheduler
- ADMINER_DEFAULT_USERNAME=bsnmysql
- ADMINER_DEFAULT_PASSWORD=bcitbsn491
configs:
- source: adminer-index.php
target: /var/www/html/index.php
configs:
adminer-index.php:
content: |
<?php
if(!count($$_GET)) {
$$_POST['auth'] = [
'driver' => $$_ENV['ADMINER_DEFAULT_DRIVER'],
'server' => $$_ENV['ADMINER_DEFAULT_SERVER'],
'db' => $$_ENV['ADMINER_DEFAULT_DB'],
'username' => $$_ENV['ADMINER_DEFAULT_USERNAME'],
'password' => $$_ENV['ADMINER_DEFAULT_PASSWORD']
];
}
include './adminer.php';
?>
volumes:
api_db: