This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
100 lines (94 loc) · 2.13 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
91
92
93
94
95
96
97
98
99
100
version: "3.8"
services:
php:
build:
context: back
target: symfony_php
args:
PHP_VERSION: ${PHP_VERSION:-8.1}
restart: unless-stopped
volumes:
- php_socket:/var/run/php
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database:5432/${POSTGRES_DB}?serverVersion=${POSTGRES_VERSION:-13}&charset=utf8
depends_on:
- database
links:
- database
caddy_back:
build:
context: back
target: symfony_caddy
args:
PHP_VERSION: ${PHP_VERSION:-8.1}
depends_on:
- php
environment:
SERVER_NAME: ${SERVER_NAME:-localhost, caddy:80}
restart: unless-stopped
volumes:
- php_socket:/var/run/php
- caddy_data:/data
- caddy_config:/config
ports:
# HTTP
- target: 80
published: ${API_HTTP_PORT}
protocol: tcp
# HTTPS
- target: 443
published: ${API_HTTPS_PORT}
protocol: tcp
# HTTP/3
- target: 443
published: ${API_HTTPS_PORT}
protocol: udp
database:
image: postgres:${POSTGRES_VERSION:-13}-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
vite:
build:
context: front
target: vite_node
restart: unless-stopped
depends_on:
- caddy_back
caddy_front:
build:
context: front
target: vite_caddy
depends_on:
- vite
environment:
SERVER_NAME: ${SERVER_NAME:-localhost, caddy:80}
restart: unless-stopped
volumes:
- caddy_data_front:/data
- caddy_config_front:/config
ports:
# HTTP
- target: 80
published: ${VITE_HTTP_PORT}
protocol: tcp
# HTTPS
- target: 443
published: ${VITE_HTTPS_PORT}
protocol: tcp
# HTTP/3
- target: 443
published: ${VITE_HTTPS_PORT}
protocol: udp
volumes:
php_socket:
caddy_data:
caddy_data_front:
caddy_config:
caddy_config_front: