docker-compose.yml
860 Bytes
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
version: "3"
services:
web:
image: nginx
container_name: nginx
ports:
- "8081:80"
networks:
mynet:
ipv4_address: 172.28.0.2
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ./web:/var/www/html
restart: on-failure
links:
- app
svelte:
image: node
container_name: svelte
working_dir: /var/www/html
volumes:
- ./web:/var/www/html
command: bash -c "npm install && npm run dev"
restart: on-failure
app:
image: node
container_name: node
ports:
- "8082:80"
networks:
mynet:
ipv4_address: 172.28.0.3
working_dir: /app
volumes:
- ./node:/app
- ./config:/app/config
command: bash -c "npm install && node app.js"
environment:
- NODE_ENV=production
restart: on-failure
networks:
mynet:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16