-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
82 lines (74 loc) · 2.15 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
services:
web:
image: nginx
container_name: th_web
depends_on:
- app
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/letsencrypt:/etc/letsencrypt:Z
- ./docker/nginx-conf/nginx.conf:/etc/nginx/nginx.conf:Z
- ./docker/nginx-conf/server-common.conf:/etc/nginx/server-common.conf:Z
- ./docker/nginx-html:/opt/nginx-html:Z
app:
image: sbaird/tiddlyhost-base:latest
container_name: th_app
depends_on:
- db
- cache
volumes:
- ./rails:/opt/app:Z
- ./docker/bundle:/opt/bundle:Z
- ./docker/node_modules:/opt/app/node_modules:Z
- ./docker/log:/var/log/app:Z
- ./docker/dotcache:/home/appuser/.cache:Z
command: /bin/start-rails.sh
security_opt:
# Todo: Figure out what syscalls chrome sandbox really needs
# and use an appropriate policy
- "seccomp:unconfined"
build:
context: .
dockerfile: docker/Dockerfile.base
args:
- USER_ID
- GROUP_ID
jobs:
image: sbaird/tiddlyhost-base:latest
container_name: th_jobs
depends_on:
- db
- cache
volumes:
- ./rails:/opt/app:Z
- ./docker/bundle:/opt/bundle:Z
- ./node_modules:/opt/node_modules:Z
- ./docker/log:/var/log/app:Z
- ./docker/dotcache:/home/appuser/.cache:Z
command: /bin/start-delayed-job.sh
security_opt:
# Todo: Figure out what syscalls chrome sandbox really needs
# and use an appropriate policy
- "seccomp:unconfined"
# It uses the same image as app so no need for build
cache:
image: memcached
container_name: th_cache
command: memcached -I 8M
db:
image: postgres:16
container_name: th_db
environment:
# Relevant only when the container finds no existing database.
# If you are initializing a new db then change the password
# after the db is created, or modify this temporarily before
# starting it for the first time.
POSTGRES_PASSWORD: postgres
# So we can use localhost for the rails db when running
# on bare metal rather than in the app container
ports:
- "5432:5432"
volumes:
- ./docker/postgresql-data/data16:/var/lib/postgresql/data:Z