-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
90 lines (88 loc) · 2.71 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
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
version: '3.4'
services:
php-fpm:
image: ghcr.io/retch/shareabike-backend:latest
environment:
APP_ENV: prod
# Choose a unique app secret
APP_SECRET: 00000000000000000000000000000000
DATABASE_URL: postgresql://app:app@db:5432/shareabike?serverVersion=15&charset=utf8
JWT_TTL: 300
JWT_REFRESH_COOKIE_SECURE: true
JWT_REFRESH_TOKEN_TTL: 2592000
# Adapter password hash $ has to be escaped with another $. The hashed password equals "password". Please change! https://bcyrpt.online
ADAPTER_USERNAME: adapter
ADAPTER_PASSWORDHASH: $$2y$$05$$FeOvneskMbZH6BomStPKp.h.cV035NSTFF66JJOmu.ox60DHt2Eeq
OMNI_ADAPTER_URL: http://omni-adapter:8079
OMNI_LOCK_RING_AMOUNT: 5
CORS_ALLOW_ORIGIN: http://localhost:4200 # Change this to your frontend URL
restart: unless-stopped
command: sh -c "php bin/console cache:clear && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console lexik:jwt:generate-keypair --skip-if-exists && php-fpm"
healthcheck:
test: ["CMD", "nc", "-zv", "localhost", "9000"]
interval: 10s
timeout: 5s
retries: 5
depends_on:
db:
condition: service_healthy
nginx:
image: nginx:1.25.2-alpine3.18
restart: unless-stopped
container_name: shareabike-backend-nginx
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php-fpm
db:
image: postgres:15.4-alpine3.18
environment:
POSTGRES_DB: shareabike
POSTGRES_USER: app
POSTGRES_PASSWORD: app
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app -d shareabike"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- shareabike_db_data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:latest
restart: unless-stopped
container_name: shareabike-pgadmin
environment:
- PGADMIN_DEFAULT_PASSWORD=password
volumes:
- shareabike_pgadmin_data:/var/lib/pgadmin
ports:
- "5050:80"
depends_on:
db:
condition: service_healthy
omni-adapter:
image: ghcr.io/retch/shareabike-omni-lock-adapter:latest
restart: unless-stopped
environment:
- BACKEND_HOST_URL=http://nginx:80
- BACKEND_USERNAME=adapter
- BACKEND_PASSWORD=password
ports:
- "9679:9679"
depends_on:
- nginx
admin-ui:
image: ghcr.io/retch/shareabike-admin:latest
restart: unless-stopped
container_name: shareabike-admin
environment:
API_URL: http://localhost:8000
ports:
- "4200:80"
volumes:
shareabike_db_data:
shareabike_pgadmin_data: