blob: a46388a8634288752c320d628fce94dd744b5833 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# To use this compose you should first build Traffic Ops and then copy the RPM to :
#
# trafficcontrol/infrastructure/docker/traffic_ops/traffic_ops.rpm
#
# You should then just be able to go to the directory trafficcontrol/infrastructure/docker/traffic_ops/
# and type 'docker-compose up -d'
#
# You should then be able to go to https://localhost and test Traffic Ops or the go api.
# if you make code changes to the Go proxy then you just need to rebuild it and then
# restart Traffic Ops:
#
# bash -c "clear && docker exec trafficops_to_server_1 /bin/bash /etc/init.d/traffic_ops /bin/bash /etc/init.d/traffic_ops start; sleep 5"
#
---
version: '3.8'
volumes:
trafficcontrol:
traffic_ops:
conf:
services:
db:
image: postgres:13.2
environment:
POSTGRES_PASSWORD: secretrootpass
ports:
- "5432:5432"
db_init:
environment:
POSTGRES_HOME: /usr/pgsql-13
PGPASSWORD: secretrootpass
POSTGRES_PASSWORD: secretrootpass
DB_USERNAME: traffic_ops
DB_NAME: traffic_ops
DB_USER_PASS: twelve
DB_SERVER: db
DB_PORT: 5432
build:
context: .
dockerfile: Dockerfile_psql
depends_on:
- db
to_server:
environment:
DB_SERVER: db
DB_PORT: 5432
DB_NAME: traffic_ops
DB_ROOT_PASS: null
DB_USER_PASS: twelve
DB_USER: traffic_ops
ADMIN_USER: superroot
ADMIN_PASS: passward
CERT_COUNTRY: US
CERT_STATE: Colorado
CERT_CITY: Denver
CERT_COMPANY: Kabletown
TRAFFIC_VAULT_PASS: tvsecret
DOMAIN: trafficops_default
ports:
- "443:443"
build:
context: .
args:
RPM: traffic_ops.rpm
volumes:
- ../../../traffic_ops/traffic_ops_golang/traffic_ops_golang:/opt/traffic_ops/app/bin/traffic_ops_golang
depends_on:
- db_init