forked from petrafilova/my-cookery-book-2-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
85 lines (82 loc) · 3.74 KB
/
docker-compose.yaml
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
version: '3.9'
services:
email:
image: 'maildev/maildev'
ports:
- '8083:1080'
- '1025:1025'
db:
image: 'postgres:14.5-alpine'
environment:
POSTGRES_DB: cookery2
POSTGRES_USER: cookery2
POSTGRES_PASSWORD: cookery2123
ports:
- '5432:5432'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U cookery2']
interval: 5s
timeout: 5s
retries: 10
volumes:
- postgre_cookery_2_data:/var/lib/postgresql/data
pgadmin:
image: 'dpage/pgadmin4'
environment:
PGADMIN_DEFAULT_EMAIL: user@domain.com
PGADMIN_DEFAULT_PASSWORD: cookery2123
PGADMIN_CONFIG_SERVER_MODE: 'False'
MASTER_PASSWORD_REQUIRED: 'False'
ports:
- '8082:80'
volumes:
- ./servers.json:/pgadmin4/servers.json
- pgadmin_cookery_2_data:/var/lib/pgadmin
depends_on:
db:
condition: service_healthy
backend:
image: 'tfilo/my-cookery-book-2-backend:latest'
restart: always
ports:
- '8080:8080'
environment:
PORT: 8080
PORT_INTERNAL: 8081
NODE_ENV: 'development'
BASE_PATH: '/api'
INTERNAL_PATH: '/internal'
NOTIFICATION_RANGE_DAYS: 1
DATABASE_PASSWORD: 'cookery2123'
DATABASE_USER: 'cookery2'
DATABASE: 'cookery2'
DATABASE_HOST: 'db'
DATABASE_PORT: 5432
DATABASE_LOGGING: 'true'
LOGGING_ERROR: 'true'
TOKEN_SIGN_KEY: 'somesecrettoken'
TOKEN_VALIDITY: '5m'
REFRESH_TOKEN_VALIDITY: '30d'
THUMBNAIL_DIMENSION: 640
IMAGE_DIMENSION: 2048
EMAIL_HOST: 'email'
EMAIL_PORT: 1025
EMAIL_USER:
EMAIL_PASS:
EMAIL_FROM: 'test@noreply.com'
RESET_LINK_VALIDITY: 12
MAIL_CONFIRM_SUBJECT: 'My Cookery Book 2: Email confirmation'
MAIL_CONFIRM_TEMPLATE_TXT_HBS: 'Welcome {{fullName}}, please confirm your email by filling form http://localhost:3000/confirm with following key {{key}} and {{username}}.'
MAIL_CONFIRM_TEMPLATE_HTML_HBS: "<h1>Welcome {{fullName}},</h1><p>please confirm your email by filling form http://localhost:3000/confirm with following key <b>{{key}}</b> and <b>{{username}}</b>. For better convenience, you can use this <a href='http://localhost:3000/confirm/{{username}}/{{key}}'>link</a>.</p>"
MAIL_NOTIFICATION_SUBJECT: 'My Cookery Book 2: new recipes'
MAIL_NOTIFICATION_TEMPLATE_TXT_HBS: "Hello {{fullName}}, here are some new recipes for you. \n {{#each recipes}} - {{name}}, http://localhost:3000/recipe/display/{{id}} \n{{/each}}"
MAIL_NOTIFICATION_TEMPLATE_HTML_HBS: "<h1>Hello {{fullName}},</h1><p>here are some new recipes for you.</p><ul>{{#each recipes}}<li><a href='http://localhost:3000/recipe/display/{{id}}' target='_blank' rel='bookmark'>{{name}}</a></li>{{/each}}</ul>"
MAIL_RESET_SUBJECT: 'My Cookery Book 2: Password reset'
MAIL_RESET_TEMPLATE_TXT_HBS: 'Hello {{fullName}}, please reset your password on following link http://localhost:3000/reset using your username and following key {{key}}.'
MAIL_RESET_TEMPLATE_HTML_HBS: "<h1>Hello {{fullName}},</h1><p>please reset your password on following <a href='http://localhost:3000/reset/{{username}}/{{key}}'>link</a> using your username and following key <b>{{key}}</b>.</p>"
depends_on:
db:
condition: service_healthy
volumes:
postgre_cookery_2_data:
pgadmin_cookery_2_data: