Move the docker-compose.yml file to a sample one, clean up other compose files.

This commit is contained in:
Buster "Silver Eagle" Neece 2018-03-05 22:01:42 -06:00
parent 15dba5e3eb
commit e778199f01
12 changed files with 43 additions and 89 deletions

3
.gitignore vendored
View File

@ -25,5 +25,6 @@ app/.env
/util/ansible/update.retry
tests/_output/*
# Docker backup files
# Docker files
/docker-compose.yml
/*.tar.gz

View File

@ -26,7 +26,7 @@ install:
- docker-compose pull
script:
- docker-compose -f docker-compose.yml -f docker-compose.testing.yml run --rm cli azuracast_testing
- docker-compose -f docker-compose.sample.yml -f docker-compose.testing.yml run --rm cli azuracast_testing
after_failure:
- cat tests/_output/*

View File

@ -84,7 +84,7 @@ Choose where on the host computer you would like AzuraCast's configuration file
Inside that directory, run this command to pull the Docker Compose configuration file.
```bash
curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker-compose.yml > docker-compose.yml
curl -L https://raw.githubusercontent.com/AzuraCast/AzuraCast/master/docker-compose.sample.yml > docker-compose.yml
```
#### Step 3: Run the AzuraCast Docker Installer

View File

@ -1,10 +0,0 @@
version: '2'
services:
mariadb:
ports:
- "127.0.0.1:3306:3306"
redis:
ports:
- "127.0.0.1:6379:6379"

View File

@ -1,54 +0,0 @@
version: '2'
services:
stations:
build:
context: ../docker-azuracast-stations
web:
build:
context: ../docker-azuracast-web
environment:
APPLICATION_ENV: "development"
volumes:
- .:/var/azuracast/www
cli:
environment:
APPLICATION_ENV: "development"
cron:
environment:
APPLICATION_ENV: "development"
nginx:
build:
context: ../docker-azuracast-nginx
volumes:
- .:/var/azuracast/www
static:
build:
context: ./util/docker/static
volumes:
- ./web/static:/data
stations_cli:
image: azuracast/azuracast_stations:latest
volumes:
- station_data:/var/azuracast/stations
command: 'bash'
mariadb:
ports:
- "3306:3306"
redis:
ports:
- "6379:6379"
chronograf:
image: chronograf:alpine
ports:
- "8888:8888"
command: "chronograf --influxdb-url=http://influxdb:8086"

View File

@ -3,6 +3,9 @@ version: '2'
services:
web:
image: azuracast/azuracast_web:latest
# Uncomment the lines below to build this image locally (Developer option)
# build:
# context: ../docker-azuracast-web
depends_on:
- mariadb
- influxdb
@ -18,12 +21,17 @@ services:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
volumes:
- www_data:/var/azuracast/www
# For development, comment the line above and uncomment the line below.
# - - .:/var/azuracast/www
- tmp_data:/var/azuracast/www_tmp
- station_data:/var/azuracast/stations
restart: always
nginx:
image: azuracast/azuracast_nginx:latest
# Uncomment the lines below to build this image locally (Developer option)
# build:
# context: ../docker-azuracast-nginx
ports:
- '80:80'
- '443:443'
@ -47,6 +55,9 @@ services:
mariadb:
image: mariadb:latest
# Uncomment to expose MariaDB to the host computer (for testing only!)
# ports:
# - "127.0.0.1:3306:3306"
volumes:
- db_data:/var/lib/mysql
environment:
@ -61,6 +72,9 @@ services:
redis:
image: redis:alpine
# Uncomment to expose Redis to the host computer (for testing only!)
# ports:
# - "127.0.0.1:6379:6379"
restart: always
cron:
@ -96,7 +110,13 @@ services:
stations:
container_name: azuracast_stations
image: azuracast/azuracast_stations:latest
# Enable the lines below to build the image locally (Developer option)
# build:
# context: ../docker-azuracast-stations
ports:
# Uncomment the line below to expose the full range of available station ports.
# Note: This is not recommended currently due to performance and memory usage problems with Docker.
# - '8000-8500:8000-8500'
- '8000:8000'
- '8005:8005'
- '8006:8006'
@ -132,6 +152,19 @@ services:
- nginx_letsencrypt_certs:/etc/nginx/ssl:ro
restart: always
# Developer Mode services
# static:
# build:
# context: ./util/docker/static
# volumes:
# - ./web/static:/data
#
# chronograf:
# image: chronograf:alpine
# ports:
# - "8888:8888"
# command: "chronograf --influxdb-url=http://influxdb:8086"
volumes:
nginx_letsencrypt_certs: {}
nginx_letsencrypt_www: {}

View File

@ -1,6 +0,0 @@
version: '2'
services:
stations:
ports:
- '8000-8500:8000-8500'

View File

@ -9,6 +9,10 @@ fi
chmod a+x update.sh
./update.sh
if [ ! -f ./docker-compose.yml ]; then
cp ./docker-compose.sample.yml ./docker-compose.yml
fi
# Dump MySQL data into fixtures folder
MYSQL_USERNAME=`awk -F "=" '/db_username/ {print $2}' app/env.ini | tr -d ' '`
MYSQL_PASSWORD=`awk -F "=" '/db_password/ {print $2}' app/env.ini | tr -d ' '`

View File

@ -15,9 +15,9 @@ docker-compose down
docker-compose pull
if [ $APP_ENV = "production" ]; then
docker-compose run --rm cli sudo azuracast_update
docker-compose run --rm cli azuracast_update
else
docker-compose run --rm cli sudo azuracast_update --dev
docker-compose run --rm cli azuracast_update --dev
fi
docker-compose up -d

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
# PowerShell equivalent:
# function docker-compose-dev { docker-compose -f docker-compose.yml -f docker-compose.build.yml -f docker-compose.dev.yml $args }
# function docker-compose-build { docker-compose -f docker-compose.yml -f docker-compose.build.yml $args }
docker-compose -f docker-compose.yml -f docker-compose.dev.yml "$@"

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
find /var/azuracast/www/app -type f \( -name '*.php' -or -name '*.phtml' \) -print > /var/azuracast/list
xgettext --files-from=/var/azuracast/list --language=PHP -o /var/azuracast/www/app/locale/default.pot

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
find /var/azuracast/www/app/locale -name \*.po -execdir msgfmt default.po -o default.mo \;