This repository was archived by the owner on Jan 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (89 loc) · 2.77 KB
/
docker-compose.yml
File metadata and controls
97 lines (89 loc) · 2.77 KB
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
version: '3.4'
x-cache-from:
- &api-cache-from
cache_from:
- ${NGINX_IMAGE:-quay.io/api-platform/nginx}
- ${PHP_IMAGE:-quay.io/api-platform/php}
services:
php:
build:
context: ./api
target: api_platform_php
<<: *api-cache-from
image: ${PHP_IMAGE:-quay.io/api-platform/php}
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
depends_on:
- db
volumes:
- ./api:/srv/api
- ./api/docker/php/conf.d/api-platform.dev.ini/:/usr/local/etc/php/conf.d/api-platform.ini
api:
build:
context: ./api
target: api_platform_nginx
<<: *api-cache-from
image: ${NGINX_IMAGE:-quay.io/api-platform/nginx}
depends_on:
- php
volumes:
- ./api/public:/srv/api/public
labels:
- "traefik.enable=true"
- "traefik.http.routers.ryzencontroller-app-http.entrypoints=http"
- "traefik.http.routers.ryzencontroller-app-http.rule=Host(`api.ryzencontroller.localhost`, `reverseproxy`)"
- "traefik.http.routers.ryzencontroller-app-https.entrypoints=https"
- "traefik.http.routers.ryzencontroller-app-https.rule=Host(`api.ryzencontroller.localhost`)"
- "traefik.http.routers.ryzencontroller-app-https.tls=true"
db:
image: postgres:12-alpine
environment:
- POSTGRES_DB=api
- POSTGRES_PASSWORD=!ChangeMe!
- POSTGRES_USER=api-platform
volumes:
- db-data:/var/lib/postgresql/data:rw
labels:
- "traefik.enable=false"
ports:
- target: 5432
published: 5432
protocol: tcp
yarn:
image: node:13-alpine
volumes:
- ./api:/app
working_dir: /app
entrypoint: /usr/local/bin/yarn
admin:
build:
context: ./admin
target: api_platform_admin_development
cache_from:
- ${ADMIN_IMAGE:-quay.io/api-platform/admin}
image: ${ADMIN_IMAGE:-quay.io/api-platform/admin}
volumes:
- ./admin:/usr/src/admin
labels:
- "traefik.enable=true"
- "traefik.http.services.ryzencontroller-admin.loadbalancer.server.port=3000"
- "traefik.http.routers.ryzencontroller-admin-http.entrypoints=http"
- "traefik.http.routers.ryzencontroller-admin-http.rule=Host(`admin.ryzencontroller.localhost`)"
- "traefik.http.routers.ryzencontroller-admin-https.tls=true"
- "traefik.http.routers.ryzencontroller-admin-https.entrypoints=https"
- "traefik.http.routers.ryzencontroller-admin-https.rule=Host(`admin.ryzencontroller.localhost`)"
reverseproxy:
image: traefik:v2.0
volumes:
- ./docker/traefik/certs/:/etc/certs/
- ./docker/traefik/conf/:/etc/traefik/
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- 80:80
- 443:443
- 8080:8080 # Traefik Web-UI
volumes:
db-data: {}