-
Notifications
You must be signed in to change notification settings - Fork 102
/
docker-compose.e2e.yml
119 lines (114 loc) · 2.91 KB
/
docker-compose.e2e.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
networks:
e2e:
volumes:
e2e_cache:
e2e_logs:
e2e_protected_media:
e2e_scan_directory:
services:
e2e-proxy:
image: reallibrephotos/librephotos-proxy:${tag}
container_name: e2e-proxy
restart: unless-stopped
command: /bin/bash -c "sed -ri 's/(backend|frontend)/e2e-\1/' /etc/nginx/nginx.conf && nginx -g 'daemon off;'"
volumes:
- e2e_scan_directory:/data
- e2e_protected_media:/protected_media
ports:
- 8080:80
healthcheck:
test: curl -sI localhost | grep HTTP | grep 200
interval: 5s
timeout: 5s
retries: 12
depends_on:
e2e-backend:
condition: service_healthy
e2e-frontend:
condition: service_healthy
networks:
- e2e
e2e-db:
image: postgres:13
container_name: e2e-db
restart: unless-stopped
environment:
- POSTGRES_USER=${dbUser}
- POSTGRES_PASSWORD=${dbPass}
- POSTGRES_DB=${dbName}
volumes:
- ${e2e_bootstrap_dir:-./e2e}/init.sql.gz:/docker-entrypoint-initdb.d/init.sql.gz
healthcheck:
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
interval: 5s
timeout: 5s
retries: 12
networks:
- e2e
e2e-frontend:
container_name: e2e-frontend
environment:
- DEBUG=1
- WDS_SOCKET_PORT=0 # needed for webpack-dev-server
tty: true
build:
context: ./frontend
dockerfile: Dockerfile.dev
restart: unless-stopped
volumes:
- ${codedir}/librephotos-frontend:/usr/src/app
healthcheck:
test: curl -sI localhost:3000 | grep HTTP | grep 200
interval: 5s
timeout: 5s
retries: 24
depends_on:
e2e-backend:
condition: service_healthy
networks:
- e2e
e2e-backend:
container_name: e2e-backend
tty: true
stdin_open: true
build:
context: ./backend
dockerfile: Dockerfile
args:
DEBUG: 1
restart: unless-stopped
entrypoint: /e2e/entrypoint.sh
volumes:
- ${e2e_bootstrap_dir:-./e2e}:/e2e
- ${codedir}/librephotos:/code
- e2e_scan_directory:/data
- e2e_protected_media:/protected_media
- e2e_logs:/logs
- e2e_cache:/root/.cache
environment:
- SECRET_KEY=${shhhhKey:-}
- BACKEND_HOST=e2e-backend
- ADMIN_EMAIL=${adminEmail:-admin@local.host}
- ADMIN_USERNAME=${userName:-admin}
- ADMIN_PASSWORD=${userPass:-admin}
- DB_BACKEND=postgresql
- DB_NAME=${dbName}
- DB_USER=${dbUser}
- DB_PASS=${dbPass}
- DB_HOST=e2e-db
- DB_PORT=5432
- MAPBOX_API_KEY=${mapApiKey:-}
- WEB_CONCURRENCY=${gunniWorkers:-1}
- SKIP_PATTERNS=${skipPatterns:-}
- ALLOW_UPLOAD=${allowUpload:-true}
- DEBUG=1
healthcheck:
test: curl -sI localhost:8001 | grep HTTP | grep 401
interval: 5s
timeout: 5s
retries: 24
depends_on:
e2e-db:
condition: service_healthy
networks:
- e2e