-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 1.01 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
version: '3.9'
services:
nginx:
container_name: reverse_proxy
image: nginx:alpine
ports:
- '8000:80'
volumes:
- ./php/:/var/www/html
- ./default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- node
php:
container_name: php
image: php:8.0-apache
volumes:
- ./php/:/var/www/html
node:
image: node:18.10-slim
environment:
- NODE_ENV=production
working_dir: /app
volumes:
- ./node/:/app
depends_on:
- php
command: >
sh -c '
if [ -z "$(which yarn)" ]; then
echo "Yarn not found, installing...";
npm install -g yarn;
else
echo "Yarn is already installed";
fi &&
if [ -z "$(which typescript)" ]; then
echo "Typescript not found, installing...";
npm install -g typescript;
else
echo "Typescript is already installed";
fi &&
yarn install &&
npx prisma generate &&
yarn start
'