Commit 46d0c0e8 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

add docker-compse base setup

parent 6e4a1a09
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html;
}
location /openid/ {
proxy_pass http://steering-django:8000/openid/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
location /steering/ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_pass http://steering-django:8000/;
proxy_redirect ~^/?(.*)$ $scheme://$host:$server_port/steering/$1;
sub_filter 'href="/' 'href="/steering/';
sub_filter 'src="/' 'src="/steering/';
sub_filter 'action="/' 'action="/steering/';
sub_filter_once off;
}
#location /tank/ {
# proxy_buffering off;
# proxy_ignore_headers "X-Accel-Buffering";
# proxy_request_buffering off;
# proxy_http_version 1.1;
# proxy_pass http://tank:8040/;
#}
}
\ No newline at end of file
store:
path: "${TANK_STORE_PATH}"
audio:
format: flac
sample-rate: 44100
db:
type: postgres
host: "${TANK_DB_HOST}"
tls: disable
username: "${TANK_DB_USERNAME}"
password: "${TANK_DB_PASSWORD}"
database: "${TANK_DB_NAME}"
importer:
temp-path: "${TANK_IMPORTER_TEMP_PATH}"
workers: 4
normalizer: ffmpeg
auth:
sessions:
## defaults to 24h
max-age: 12h
oidc:
# These values have to be overwritten after steering setup
#issuer-url: http://steering-django:8000/openid
#client-id: 123456
#client-secret: abcdef1234567890
#callback-url: https://tank:8400/auth/oidc/callback
#login-timeout: 10m # defaults to 5 Minutes
issuer-url: http://steering-django:8000/openid
client-id: 935527
client-secret: 4PjvlQOxw7FQnKA04fKWmPHnUlXQtzmE
callback-url: http://aura-local/tank/auth/oidc/callback
login-timeout: 10m # defaults to 5 Minutes
web:
### one of stdout, stderr, file:/path/to/access.log
#access-logs: /var/log/tank.access.log
access-logs: stdout
#base-url: /tank/
debug-ui:
enabled: false
### uncomment to enable CORS headers
### see: https://godoc.org/github.com/rs/cors#Options
#cors:
# allowed-origins: ['http://aura-test.o94.at']
# allowed-methods:
# - GET
# - PUT
# - POST
# - PATCH
# - DELETE
# allowed-headers: ['Authorization', 'Content-Type']
# allow-credentials: true
# debug: true
version: "3.4"
services:
steering-postgres:
container_name: steering-postgres
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: ${STEERING_DB_PASS}
POSTGRES_USER: ${STEERING_DB_USER}
POSTGRES_DB: ${STEERING_DB_NAME}
volumes:
- ./container-data/steering-db:/var/lib/postgresql/data
expose:
- "5432"
#ports: # only for dev setup
# - "127.0.0.1:5432:5432"
networks:
- auranet
steering-django:
container_name: steering-django
build:
context: ./steering
#target: prod
target: dev # for dev setup
depends_on:
- steering-postgres
volumes: # for dev setup
- ./steering:/aura
expose:
- "8000"
ports: # only for dev setup
- "127.0.0.1:8000:8000"
networks:
- auranet
tank-postgres:
container_name: tank-postgres
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: ${TANK_DB_PASS}
POSTGRES_USER: ${TANK_DB_USER}
POSTGRES_DB: ${TANK_DB_NAME}
volumes:
- ./container-data/tank-db:/var/lib/postgresql/data
expose:
- "5432"
#ports: # only for dev setup
# - "127.0.0.1:5432:5432"
networks:
- auranet
tank:
container_name: tank
build:
context: ./tank
depends_on:
- steering-django
- tank-postgres
environment:
TANK_DB_HOST: tank-postgres
TANK_DB_NAME: ${TANK_DB_NAME}
TANK_DB_PASSWORD: ${TANK_DB_PASS}
TANK_DB_USERNAME: ${TANK_DB_USER}
volumes:
- ./container-data/tank-store:/srv/audio
- ./container-config/tank.yaml:/etc/aura/tank.yaml:ro
networks:
- auranet
dashboard:
container_name: dashboard
build:
context: ./dashboard
target: prod
depends_on:
- steering-django
volumes:
- ./dashboard/dist_docker:/aura/dist_docker
command: sh build_for_docker.sh
aura-web:
container_name: aura-web
image: nginx:stable-alpine
depends_on:
- steering-django
- tank
- dashboard
expose:
- "80"
- "443"
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
volumes:
- ./container-config/nginx:/etc/nginx/conf.d
- ./dashboard/dist_docker:/usr/share/nginx/html
networks:
- auranet
networks:
auranet:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment