/
docker-compose.prod.yml
44 lines (42 loc) · 1 KB
/
docker-compose.prod.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
# This compose-file is production only. So, it should not be called directly.
# Instead, it should be a part of your deploy strategy.
# Including something like:
#
# $ docker-compose -f docker-compose.yml -f docker/docker-compose.prod.yml > docker-compose.deploy.yml
#
# This setup is supposed to be used with `docker-swarm`.
version: "3"
services:
caddy:
image: "wemakeservices/caddy-docker:v0.10.9"
env_file: ./config/.env
volumes:
- ./docker/caddy:/root/.caddy
ports:
- "80:80"
- "443:443"
- "2015:2015"
depends_on:
- vue
networks:
- webnet
vue:
build:
context: .
dockerfile: ./docker/vue/Dockerfile
args:
APP_ENV: production
command: pm2-docker ./docker/vue/process.yml
exposes:
- 4000
environment:
SSR_PORT: 4000
SSR_HOST: '0.0.0.0'
deploy:
replicas: 5
resources:
limits:
cpus: "0.15"
memory: 100M
restart_policy:
condition: on-failure