generated from wayofdev/laravel-starter-tpl
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
86 lines (79 loc) · 2.19 KB
/
docker-compose.yaml
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
---
version: '3.9'
services:
app:
image: wayofdev/php-dev:8.2-fpm-alpine-latest
container_name: ${COMPOSE_PROJECT_NAME}-app
restart: on-failure
networks:
- default
- shared
depends_on:
- database
links:
- database
external_links:
- "rabbitmq.${PROJECT_SERVICES_NAMESPACE}.alias:rabbitmq"
volumes:
- ./app:/app:rw,cached
- ./.env:/app/.env
- ~/.composer:/.composer
# SSH agent forwarding on unix sockets won't work
# https://medium.com/@vanuan/ssh-and-docker-compose-7bce10b67765
# Reverting to mounting the ssh folder
- ~/.ssh:/home/www-data/.ssh
environment:
FAKETIME: "+2h"
env_file:
- .env
dns:
8.8.8.8
web:
image: wayofdev/nginx:k8s-alpine-latest
container_name: ${COMPOSE_PROJECT_NAME}-web
restart: on-failure
networks:
- default
- shared
depends_on:
- app
links:
- app
volumes:
- ./app:/app:rw,cached
- ./.env:/app/.env
- ./certs:/etc/nginx/ssl
env_file:
- .env
labels:
- traefik.enable=true
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}-secure.rule=Host(`api.${COMPOSE_PROJECT_NAME}.docker`)
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}-secure.entrypoints=websecure
- traefik.http.routers.api-${COMPOSE_PROJECT_NAME}-secure.tls=true
- traefik.http.services.api-${COMPOSE_PROJECT_NAME}-secure.loadbalancer.server.port=8443
- traefik.http.services.api-${COMPOSE_PROJECT_NAME}-secure.loadbalancer.server.scheme=https
database:
image: wayofdev/postgres:15-alpine-latest
container_name: ${COMPOSE_PROJECT_NAME}-database
restart: on-failure
networks:
- default
- shared
ports:
- '${DB_FORWARD_PORT:-5433}:5432'
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
volumes:
- database-data:/var/lib/postgresql/data:cached
volumes:
database-data:
name: ${COMPOSE_PROJECT_NAME}-database-data
networks:
shared:
external: true
name: network.${SHARED_SERVICES_NAMESPACE}
default:
name: project.${COMPOSE_PROJECT_NAME}
...