forked from hackmdio/docker-hackmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (56 loc) · 1.88 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
# Using version 3 to provide play-with-docker badge
# You can change to version 2 without breaking.
#version: '2'
version: '3'
services:
database:
# Don't upgrade postgres by simply changing the version number
# You need to migrate the Database to the new postgres version
image: postgres:9.6-alpine
environment:
- POSTGRES_USER=hackmd
- POSTGRES_PASSWORD=hackmdpass
- POSTGRES_DB=hackmd
volumes:
- database:/var/lib/postgresql/data
networks:
backend:
aliases:
- hackmdPostgres
- hackmdpostgres
restart: always
app:
# Uncomment the following section to build the image yourself:
#build:
# context: .
# dockerfile: debian/Dockerfile
# args:
# - "VERSION=master"
# - "HACKMD_REPOSITORY=https://github.com/hackmdio/hackmd.git"
image: hackmdio/hackmd:0.5.1
environment:
# DB_URL is formatted like: <databasetype>://<username>:<password>@<hostname>/<database>
# Other examples are:
# - mysql://database:3306/database
# - sqlite:///data/sqlite.db (NOT RECOMMENDED)
# - For details see the official sequelize docs: http://docs.sequelizejs.com/en/v3/
- HMD_DB_URL=postgres://hackmd:hackmdpass@hackmdPostgres:5432/hackmd
ports:
# Ports that are published to the outside.
# The latter port is the port inside the container. It should always stay on 3000
# If you only specify a port it'll published on all interfaces. If you want to use a
# local reverse proxy, you may want to listen on 127.0.0.1.
# Example:
# - "127.0.0.1:3000:3000"
- "3000:3000"
networks:
backend:
restart: always
# Define networks to allow best isolation
networks:
# Internal network for communication with Postgres
backend:
# Define named volumes so data stays in place
volumes:
# Volume for Postgres database
database: