forked from AngularNoobNuernberg/project-clara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
34 lines (30 loc) · 1005 Bytes
/
docker-compose.production.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
version: '2'
services:
project-clara-angular:
build:
context: ./project-clara-client
dockerfile: ./.docker/project-clara-angular.production.dockerfile
command: ng build --prod --aot=false
container_name: project-clara-angular-build-prod
image: project-clara-angular
networks:
- prod-network
volumes:
- ./project-clara-client/dist:/home/app/project-clara/dist
project-clara-nginx:
command: /bin/bash -c "envsubst '$$NGINX_HOST $$NGINX_PORT' < /etc/nginx/conf.d/project-clara.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
container_name: project-clara-nginx-prod
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
image: nginx
networks:
- prod-network
ports:
- '8080:80'
volumes:
- ./project-clara-client/.docker/nginx.conf:/etc/nginx/conf.d/project-clara.template
- ./project-clara-client/dist:/var/www/project-clara
networks:
prod-network:
driver: bridge