Newer
Older
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
version: '3.8'
services:
# -------------------------------------------------------------------------
# Service Base de données
# -------------------------------------------------------------------------
database:
image: postgres:15-alpine
container_name: tax_database
environment:
POSTGRES_DB: app
POSTGRES_PASSWORD: root
POSTGRES_USER: app
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5433:5432"
# -------------------------------------------------------------------------
# Service Backend API (Symfony)
# -------------------------------------------------------------------------
php:
build:
context: ./api
target: app_php_dev
container_name: tax_api
depends_on:
- database
restart: unless-stopped
volumes:
- ./api:/app
- ./resources:/app/resources
environment:
SERVER_NAME: :80
DATABASE_URL: postgresql://app:root@database:5432/app?serverVersion=15&charset=utf8
CORS_ALLOW_ORIGIN: ^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$
APP_SECRET: root
ports:
- "8000:80"
# -------------------------------------------------------------------------
# Service Frontend (PWA)
# -------------------------------------------------------------------------
pwa:
build:
context: ./pwa
target: dev
container_name: tax_pwa
volumes:
- ./pwa:/app
- /app/node_modules
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_ENTRYPOINT: http://localhost:8000/api
REACT_APP_API_URL: http://localhost:8000/api
volumes:
db-data: