-
Notifications
You must be signed in to change notification settings - Fork 63
/
docker-compose_public_ip.yml
72 lines (67 loc) · 1.91 KB
/
docker-compose_public_ip.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
# This docker-compose_public_ip.yml is specifically for quickly setting up
# 4CAT on a server and hosting AT THE IP address. I.e. http://1.2.3.4
# It was made to quickly deploy on SURF's research cloud
# https://www.surf.nl/en/research-it
# The issue this "solves" is allowing 4CAT to be deployed on an unknown
# IP address which is only provided by SURF after 4CAT deployment.
services:
db:
container_name: 4cat_db
image: postgres:${POSTGRES_TAG}
restart: unless-stopped
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
volumes:
- 4cat_db:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
backend:
image: digitalmethodsinitiative/4cat:latest
container_name: 4cat_backend
init: true
restart: unless-stopped
env_file:
- .env
depends_on:
db:
condition: service_healthy
ports:
- ${PUBLIC_API_PORT}:4444
volumes:
- 4cat_data:/usr/src/app/data/
- 4cat_config:/usr/src/app/config/
- 4cat_logs:/usr/src/app/logs/
# The -h sets your SERVER_NAME to hostname
entrypoint: docker/docker-entrypoint.sh -h
frontend:
image: digitalmethodsinitiative/4cat:latest
container_name: 4cat_frontend
restart: unless-stopped
env_file:
- .env
depends_on:
- db
- backend
ports:
- 445:443
- 8080:5000
volumes:
- 4cat_data:/usr/src/app/data/
- 4cat_config:/usr/src/app/config/
- 4cat_logs:/usr/src/app/logs/
command: ["docker/wait-for-backend.sh"]
volumes:
4cat_db:
name: ${DOCKER_DB_VOL}
4cat_data:
name: ${DOCKER_DATA_VOL}
4cat_config:
name: ${DOCKER_CONFIG_VOL}
4cat_logs:
name: ${DOCKER_LOGS_VOL}