Add a Docker Compose file for production

This commit is contained in:
Oliver Davies 2021-06-30 19:00:00 +01:00
parent 08ad9bab9e
commit 8d557df62a
3 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,29 @@
version: '2.4'
services:
web:
build:
context: .
dockerfile: tools/docker/images/nginx/Dockerfile
volumes:
- html:/app
ports:
- 80:80
depends_on:
- app
- assets
restart: always
app:
volumes:
- assets:/app/source/build
- html:/app/output_prod
- .:/app
command: generate -e prod
assets:
entrypoint: npm
command: run production
volumes:
html:

View file

@ -0,0 +1,2 @@
FROM nginx:1 as base
COPY tools/docker/images/nginx/root /

View file

@ -0,0 +1,13 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /app;
index index.html index.htm;
}
error_page 404 /404.html;
}