-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (81 loc) · 2.35 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
version: "3.9"
# The different services that make up our "network" of containers
services:
# MariaDB Database
mariadb:
image: mariadb:10
# mounting a named volume to the container to track db data
volumes:
- mariadb_data:/var/lib/mysql
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
restart: always
environment:
MARIADB_ROOT_PASSWORD: secret
MARIADB_DATABASE: g8
MARIADB_USER: codeql
MARIADB_PASSWORD: codeql
# Remove comment if want to expose MariaDB service to host
# ports:
# - 3306:3306
# Express frontend
frontend:
# The location of dockerfile to build this service
build: ./frontend
environment:
NODE_ENV: production
PORT: 5000
# Ports to map our port 3000, to the port 5000 on the container
ports:
- "3000-3005:5000"
depends_on:
- backend
# Express backend
backend:
# The location of dockerfile to build this service
build:
context: ./backend
dockerfile: Dockerfile
args:
# UNCOMMENT TO SPECIFY A CODEQL CLI VERSION, defaults to latest version
# CODEQL_VERSION: "v2.5.7"
PRECOMPILE_QUERIES: "true" # FALSE TO REDUCE CREATION TIME
volumes:
- backend_uploads:/uploads/
- backend_database:/databases/
- backend_sarif:/SarifFiles/
environment:
CODEQL_HOME: /usr/local/codeql-home
DB_HOST: mariadb
DB_NAME: g8
DB_USER: codeql
DB_PWD: codeql
NEO_HOST: neo
NEO_USER: neo4j
NEO_PWD: s3cr3t
# Ports to map our port 8080, to the port 8080 on the container
# ports:
# - 8080:8080
# Tell docker this container depends on the neo service & mariadb so they can communicate
depends_on:
- neo
- mariadb
# Neo4j Database
neo:
# The image to use
image: neo4j:4.2.7
# map the ports so we can check the db server is up
# ports:
# - 7474:7474
# - 7687:7687
environment:
- NEO4J_AUTH=neo4j/s3cr3t # configure the instance with custom username/password
# Raise memory limits
- NEO4J_dbms_memory_pagecache_size=1G
- NEO4J_dbms.memory.heap.initial_size=1G
- NEO4J_dbms_memory_heap_max__size=1G
# volumes to be generated, these are saved somewhere for repeated use by docker
volumes:
mariadb_data:
backend_uploads:
backend_database:
backend_sarif: