forked from Juniper/nita-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
66 lines (65 loc) · 2.07 KB
/
docker-compose.yaml
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
# ********************************************************
#
# Project: nita-webapp
#
# Copyright (c) Juniper Networks, Inc., 2021. All rights reserved.
#
# Notice and Disclaimer: This code is licensed to you under the Apache 2.0 License (the "License"). You may not use this code except in compliance with the License. This code is not an official Juniper product. You can obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0.html
#
# SPDX-License-Identifier: Apache-2.0
#
# Third-Party Code: This code may depend on other components under separate copyright notice and license terms. Your use of the source code for those components is subject to the terms and conditions of the respective license as noted in the Third-Party source code file.
#
# ********************************************************
version: "2.0"
services:
webapp:
image: juniper/nita-webapp:22.8-1
command: ./build-and-test-webapp/wait-for-db.sh
networks:
- nita-network
depends_on: [ db ]
environment:
- DJANGO_LOG_LEVEL=DEBUG
- WEBAPP_USER
- WEBAPP_PASS
- JENKINS_USER
- JENKINS_PASS
- JENKINS_PORT
- JENKINS_URL
restart: always
#
# For external Jenkins hosts, uncomment the lines below and change IP
# Jenkins' server IP address. This allows the name Jenkins to resolve
# properly in the container environment. Please see detailed instructions
# in README file for implications of this change.
#
# extra_hosts:
# - "jenkins:192.168.X.y"
db:
image: mariadb:10.4.12
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_DATABASE: Sites
MYSQL_ROOT_PASSWORD: root
networks:
- nita-network
volumes:
- "mariadb:/var/lib/mysql"
restart: always
proxy:
image: nginx:stable
volumes:
- "./nginx/nginx.conf:/etc/nginx/nginx.conf"
- "./nginx/certificates/:/etc/certificate/"
ports:
- "443:443"
networks:
- nita-network
depends_on: [ webapp ]
restart: always
volumes:
mariadb:
networks:
nita-network:
external: true