Always set the "core" Docker images to restart.

Create a static files build image in Docker to allow for LESS recompilation.
This commit is contained in:
Buster Silver 2017-06-02 10:09:38 -05:00
parent 19770bad9a
commit 96510db37b
4 changed files with 45 additions and 1 deletions

View File

@ -15,4 +15,15 @@ services:
stations:
build:
context: ./util/docker/stations
context: ./util/docker/stations
# Static assets (grunt, bower, etc)
static:
build:
context: ./util/docker/static
volumes:
- ./web/static:/var/azuracast/www/web/static
mariadb:
ports:
- "3306:3306"

View File

@ -11,6 +11,7 @@ services:
- stations
volumes:
- .:/var/azuracast/www
restart: always
mariadb:
image: mariadb:latest
@ -21,11 +22,13 @@ services:
- MYSQL_USER=azuracast
- MYSQL_PASSWORD=azur4c457
- MYSQL_DATABASE=azuracast
restart: always
influxdb:
image: influxdb:alpine
volumes:
- influx_data:/var/lib/influxdb
restart: always
web:
image: azuracast/azuracast_web:latest
@ -37,6 +40,7 @@ services:
- .:/var/azuracast/www
- cache_data:/var/azuracast/www_tmp
- station_data:/var/azuracast/stations
restart: always
cron:
image: azuracast/azuracast_web:latest
@ -53,6 +57,7 @@ services:
- influxdb
- stations
command: 'cron && tail -f /var/log/cron.log'
restart: always
stations:
image: azuracast/azuracast_stations:latest
@ -60,6 +65,7 @@ services:
- '8000-8500:8000-8500'
volumes:
- station_data:/var/azuracast/stations
restart: always
volumes:
db_data: {}

View File

@ -0,0 +1,14 @@
FROM library/node
# Install Bower & Grunt
RUN npm install -g bower grunt grunt-cli && \
echo '{ "allow_root": true }' > /root/.bowerrc
# Define working directory.
WORKDIR /data
COPY build_entrypoint.sh /data
RUN chmod a+x build_entrypoint.sh
# Define default command.
CMD ["/data/build_entrypoint.sh"]

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
cd /data
rm -rf /data/gruntfile.js
rm -rf /data/package.json
ln -s /var/azuracast/www/web/static/gruntfile.js /data/gruntfile.js
ln -s /var/azuracast/www/web/static/package.json /data/package.json
npm install --loglevel warn
bash