pairdrop/docker-compose.yml

30 lines
920 B
YAML

version: "3"
services:
node:
image: "node:lts-alpine"
user: "node"
working_dir: /home/node/app
volumes:
- ./:/home/node/app
command: ash -c "npm i && npm start"
restart: unless-stopped
nginx:
build:
context: ./docker/
dockerfile: nginx-with-openssl.Dockerfile
image: "nginx-with-openssl"
volumes:
- ./public:/usr/share/nginx/html
- ./docker/certs:/etc/ssl/certs
- ./docker/openssl:/mnt/openssl
# Use production.conf instead of development.conf to redirect http to https (/ca.crt still available via http)
- ./docker/nginx/development.conf:/etc/nginx/conf.d/default.conf
# - ./docker/nginx/production.conf:/etc/nginx/conf.d/default.conf
ports:
- "8080:80"
- "8443:443"
env_file: ./docker/fqdn.env
entrypoint: /mnt/openssl/create.sh
command: ["nginx", "-g", "daemon off;"]
restart: unless-stopped