forked from LibrePhotos/librephotos-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.e2e.raw
135 lines (129 loc) · 3.38 KB
/
docker-compose.e2e.raw
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
networks:
e2e:
volumes:
e2e_db:
e2e_cache:
e2e_logs:
e2e_protected_media:
e2e_scan_directory:
services:
e2e-__proxy_name__:
image: reallibrephotos/librephotos-proxy:${tag}
container_name: e2e-__proxy_name__
restart: unless-stopped
command: /bin/bash -c "sed -ri 's/(__backend_name__|__frontend_name__)/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_name__:
condition: service_healthy
e2e-__frontend_name__:
condition: service_healthy
networks:
- e2e
e2e-__db_name__:
image: postgres:13
container_name: e2e-__db_name__
restart: unless-stopped
environment:
- POSTGRES_USER=${dbUser}
- POSTGRES_PASSWORD=${dbPass}
- POSTGRES_DB=${dbName}
volumes:
- e2e_db:/var/lib/postgresql/data
healthcheck:
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
interval: 5s
timeout: 5s
retries: 12
networks:
- e2e
e2e-__frontend_name__:
container_name: e2e-__frontend_name__
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_name__:
condition: service_healthy
networks:
- e2e
e2e-__backend_name__:
container_name: e2e-__backend_name__
tty: true
stdin_open: true
build:
context: ./backend
dockerfile: Dockerfile
args:
DEBUG: 1
restart: unless-stopped
volumes:
- ${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_name__
- ADMIN_EMAIL=${adminEmail:-admin@localhost}
- ADMIN_USERNAME=${userName:-admin}
- ADMIN_PASSWORD=${userPass:-admin}
- DB_BACKEND=postgresql
- DB_NAME=${dbName}
- DB_USER=${dbUser}
- DB_PASS=${dbPass}
- DB_HOST=e2e-__db_name__
- DB_PORT=5432
- REDIS_HOST=e2e-__redis_name__
- REDIS_PORT=6379
- MAPBOX_API_KEY=${mapApiKey:-}
- WEB_CONCURRENCY=${gunniWorkers:-1}
- SKIP_PATTERNS=${skipPatterns:-}
- ALLOW_UPLOAD=${allowUpload:-true}
- DEBUG=1
- HEAVYWEIGHT_PROCESS=${HEAVYWEIGHT_PROCESS:-1}
healthcheck:
test: curl -sI localhost:8001 | grep HTTP | grep 401
interval: 5s
timeout: 5s
retries: 24
depends_on:
e2e-__db_name__:
condition: service_healthy
e2e-__redis_name__:
condition: service_healthy
networks:
- e2e
e2e-__redis_name__:
image: redis:6
container_name: e2e-__redis_name__
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 5s
timeout: 5s
retries: 12
networks:
- e2e