forked from RunestoneInteractive/rs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
db.compose.yml
56 lines (49 loc) · 2.07 KB
/
db.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
version: "3"
# this file can be used in conjunction with docker-compose.yml and author.compose.yml to
# add a database server in the same docker-compose network as the other runestone components
# this file is not used by default, but can be used by running
# docker compose -f docker-compose.yml -f db.compose.yml up -d
# It may also be easier in some circumstances to just copy the db service from this file to
# the docker-compose.yml file. Taking note to add db as a link for each of the other services
# The db service should be started before the other services, so that the database is available
# For first time initialization I recommend you do
# docker compose -f docker-compose.yml -f db.compose.yml up -d db
# this will start only the database server.
# Then you can run rsmanage initdb to create the database and tables and some initial population of the tables
# If you need the author server, find the lines that define the author and worker services below.
# They are marked with a comment that includes AUTHORSERVER. Uncomment the lines.
# -f author.compose.yml from the command line:
# docker compose -f docker-compose.yml -f author.compose.yml -f db.compose.yml up -d
services:
db:
image:
postgres:13
restart: always
environment:
# setting these will create a user with this password and a database with this name
# this is a feature of the postgres docker image
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-runestone}
POSTGRES_USER: ${POSTGRES_USER:-runestone}
POSTGRES_DB: ${POSTGRES_DBNAME:-runestone_dev}
# use a non-standard port to avoid conflicts with other postgres instances on the host
ports:
- 2345:5432
runestone:
links:
- db
# AUTHORSERVER- Uncomment the author and worker services below if using the author server
# author:
# links:
# - db
# worker:
# links:
# - db
book:
links:
- db
assignment:
links:
- db
rsmanage:
links:
- db