-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathdocker-compose.yml
executable file
·89 lines (84 loc) · 2.68 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
services:
backend:
build:
context: packages/backend
dockerfile: Dockerfile
# these args configure private env vars for the backend and public env vars for the frontend
args:
ADMINUSER: admin
ADMINEMAIL: "[email protected]"
ADMINPASSWORD: example_password # CHANGEME
JWTSECRET: secret
MAINDB: root:root@db:5432 # CHANGEME: 2nd 'root' is the password
DBNAME: wafrn
DOMAINNAME: localhost
PORT: 9000
SMTPHOST: smtp.example.com
SMTPUSER: wafrn
SMTPPORT: 9003
SMTPPASSWORD: example_password # CHANGEME
SMTPFROM: [email protected]
REDISHOST: redis
REDISPORT: 6379
LOG_SQL_QUERIES: false # this makes the logs really heavy, but might be useful for debugging
FRONTEND_PATH: "\\/wafrn\\/packages\\/frontend" # needs to be escaped for the sed command (\/) and yaml (\\)
## Uncomment and change these if you want to configure the frontend environment variables
# FRONTEND_LOGO: "\\/assets\\/logo.png"
# FRONTEND_URL: "localhost:9992"
# FRONTEND_SHORTEN_POSTS: 3
# FRONTEND_DISABLE_PWA: false
# FRONTEND_MAINTENANCE: false
## You can use a full URL in the next three if you want
# FRONTEND_API_URL: "\\/api"
# FRONTEND_CACHE_URL: "\\/api\\/cache?media="
# FRONTEND_MEDIA_URL: "\\/api\\/uploads"
depends_on:
- db
- redis
ports:
- 9000:9000
restart: unless-stopped
environment:
- NODE_ENV=production
volumes:
- ./packages/backend/uploads:/wafrn/uploads
- ./packages/backend/cache:/wafrn/cache
frontend:
build:
context: .
dockerfile: packages/frontend/Dockerfile
# these args configure apache redirections and headers
args:
BACKEND_URL: backend:9000 # Important: Do not include the protocol (http://) here
FRONTEND_URL: localhost:9992
## Uncomment and change these if want to configure server name and admin email for apache
# SERVER_NAME: localhost:9992
# ADMIN_EMAIL: admin@localhost:9992
## Uncomment and change these if you have different URLs for the cache and media server
# CACHE_URL: localhost:9992
# MEDIA_URL: localhost:9992
ports:
- 9992:80
db:
image: postgres:17
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: wafrn
volumes:
- dbpg:/var/lib/postgresql
ports:
- 5432:5432
adminer:
image: adminer
restart: always
ports:
- 8080:8080
redis:
image: redis:7.2.4
restart: always
ports:
- "6379:6379"
volumes:
dbpg: