60 lines
1.2 KiB
YAML
60 lines
1.2 KiB
YAML
version: "3.6"
|
|
|
|
services:
|
|
db:
|
|
image: mongo:4.0.2-xenial
|
|
command: mongod --config /etc/mongo/mongod.conf
|
|
volumes:
|
|
- ./server/db/:/etc/mongo/db/:rw
|
|
- ./server/mongod.conf:/etc/mongo/mongod.conf:ro
|
|
expose:
|
|
- "27017"
|
|
networks:
|
|
backend:
|
|
ipv4_address: 128.1.0.2
|
|
|
|
backend:
|
|
image: lateinicus/server
|
|
environment:
|
|
- LATEINICUS_USER_PW=abc123
|
|
expose:
|
|
- "8080"
|
|
depends_on:
|
|
- db
|
|
networks:
|
|
backend:
|
|
ipv4_address: 128.1.0.3
|
|
|
|
proxy:
|
|
image: nginx:1.15.4-alpine
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
networks:
|
|
- outside
|
|
- backend
|
|
volumes:
|
|
# TODO: DEBUG
|
|
- ./server/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./frontend/dist/:/srv/www/:ro
|
|
- ./server/ssl.key.pem:/etc/ssl/lateinicus.key:ro
|
|
- ./server/ssl.pem:/etc/ssl/lateinicus.pem:ro
|
|
depends_on:
|
|
- backend
|
|
|
|
|
|
# The outside network is needed to only expose the reverse
|
|
# proxy to the outside
|
|
networks:
|
|
backend:
|
|
driver: bridge
|
|
internal: yes
|
|
driver_opts:
|
|
com.docker.network.bridge.name: 'backend'
|
|
ipam:
|
|
driver: default
|
|
config:
|
|
- subnet: 128.1.0.0/8
|
|
outside:
|
|
driver: bridge
|