-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathdocker-compose.yml
88 lines (85 loc) · 2.61 KB
/
docker-compose.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Author: PH01L
# Email: phoil@osrsbox.com
# Website: https://www.osrsbox.com
#
# Description:
# Dockerfile for osrsbox-api
#
# Copyright (c) 2021, PH01L
#
###############################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
###############################################################################
version: '3'
services:
mongo:
container_name: osrsbox-api-mongo
image: mongo:latest
restart: unless-stopped
command: [--auth]
environment:
MONGO_INITDB_DATABASE: ${DATABASE_NAME}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
PROJECT_USERNAME: ${PROJECT_USERNAME}
PROJECT_PASSWORD: ${PROJECT_PASSWORD}
MONGODB_DATA_DIR: /data/db
MONDODB_LOG_DIR: /dev/null
volumes:
- ./mongo/create-database.sh:/docker-entrypoint-initdb.d/create-database.sh:ro
networks:
- backend
eve:
build:
context: eve
dockerfile: Dockerfile
container_name: osrsbox-api-eve
image: python:3.7-alpine
restart: unless-stopped
environment:
APP_ENV: ${APP_ENV}
APP_DEBUG: "False"
APP_PORT: 5000
MONGO_URI: "mongodb://mongo/db"
MONGO_PORT: ${MONGO_PORT}
DATABASE_NAME: ${DATABASE_NAME}
PROJECT_USERNAME: ${PROJECT_USERNAME}
PROJECT_PASSWORD: ${PROJECT_PASSWORD}
volumes:
- ./eve:/var/www/eve
- ./eve/scripts:/scripts
depends_on:
- mongo
networks:
- backend
nginx:
container_name: osrsbox-api-nginx
image: nginx:stable-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d/app.conf:/etc/nginx/conf.d/default.conf
# - ./nginx/conf.d/app.dev.conf:/etc/nginx/conf.d/default.conf
- ./nginx/app:/usr/share/nginx/html/
- /etc/letsencrypt/:/etc/nginx/certs/
depends_on:
- eve
networks:
- frontend
- backend
networks:
frontend:
driver: bridge
backend:
driver: bridge