-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml.dist
55 lines (52 loc) · 1.77 KB
/
docker-compose.yml.dist
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
# sampledb docker-compose configuration file
# use: "docker compose up -d" to start containers
# https://github.com/sciapp/sampledb
# Note: you will need to edit some values below to run it in production!
version: '3'
services:
web:
image: sciapp/sampledb:0.28.1
restart: always
container_name: sampledb
# Note: this config option works with docker-compose version >1.27
# If you are using an older docker-compose and cannot update to a newer version, you can use the short syntax instead
# See: https://docs.docker.com/compose/compose-file/#depends_on
depends_on:
db:
condition: service_healthy
environment:
- SAMPLEDB_CONTACT_EMAIL=sampledb@example.com
- SAMPLEDB_MAIL_SERVER=mail.example.com
- SAMPLEDB_MAIL_SENDER=sampledb@example.com
- SAMPLEDB_ADMIN_PASSWORD=password
- SAMPLEDB_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://postgres:password@sampledb-postgres:5432/postgres
# uncomment the line below for development purposes
#- FLASK_DEBUG=1
ports:
# if you want sampledb to run on a different port, change the first number
# host:container
- '8000:8000'
networks:
- sampledb-net
# the postgres database image
db:
image: postgres:12
restart: always
container_name: sampledb-postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
environment:
- POSTGRES_PASSWORD=password
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
# this is where you will keep the database persistently
# host:container
- ./pgdata:/var/lib/postgresql/data
networks:
- sampledb-net
# the internal sampledb network
networks:
sampledb-net: