-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
84 lines (81 loc) · 1.94 KB
/
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
name: 'sae4-docker-stack'
services:
nginx:
build:
context: .
dockerfile: ./build/nginx/Dockerfile
image: ${COMPOSE_PROJECT_NAME}-nginx
container_name: ${COMPOSE_PROJECT_NAME}-nginx
volumes:
- type: bind
source: ./sae4api
target: /app/sae4api
depends_on:
- sae4api
ports:
- 8000:80
networks:
- network
sae4api:
build:
args:
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
USER_NAME: ${USER_NAME:-0}
GROUP_NAME: ${GROUP_NAME:-0}
context: .
dockerfile: ./build/sae4api/Dockerfile
image: ${COMPOSE_PROJECT_NAME}-sae4api
container_name: ${COMPOSE_PROJECT_NAME}-sae4api
volumes:
- type: bind
source: ./sae4api
target: /app/sae4api
#command: sh -c 'composer install --no-interaction --optimize-autoloader && php-fpm'
depends_on:
- database
networks:
- network
sae4app:
build:
args:
USER_ID: ${USER_ID:-0}
GROUP_ID: ${GROUP_ID:-0}
USER_NAME: ${USER_NAME:-0}
GROUP_NAME: ${GROUP_NAME:-0}
context: .
dockerfile: ./build/sae4app/Dockerfile
container_name: ${COMPOSE_PROJECT_NAME}-sae4app
volumes:
- ./sae4app:/app
command: sh -c 'yarn install && yarn dev --host'
ports:
- 5173:5173
networks:
- network
database:
build:
context: .
dockerfile: ./build/database/Dockerfile
image: ${COMPOSE_PROJECT_NAME}-database
container_name: ${COMPOSE_PROJECT_NAME}-database
ports:
- 3306:3306
volumes:
- type: volume
source: database-volume
target: /var/lib/mysql
environment:
MYSQL_DATABASE: dbsae4api
MYSQL_ROOT_PASSWORD: dbsae4api
MYSQL_USER: api
MYSQL_PASSWORD: api
networks:
- network
networks:
network:
name : ${COMPOSE_PROJECT_NAME}-network
driver: bridge
volumes:
database-volume:
driver: local