forked from AzuraCast/AzuraCast
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (62 loc) · 1.89 KB
/
Dockerfile
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
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM golang:1.17-buster AS dockerize
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssl git
RUN go install github.com/jwilder/dockerize@latest
# Final build image
FROM ubuntu:focal
ENV TZ="UTC"
# Add Dockerize
COPY --from=dockerize /go/bin/dockerize /usr/local/bin
# Run base build process
COPY ./util/docker/web /bd_build/
RUN chmod a+x /bd_build/*.sh \
&& /bd_build/prepare.sh \
&& /bd_build/add_user.sh \
&& /bd_build/setup.sh \
&& /bd_build/cleanup.sh \
&& rm -rf /bd_build
#
# START Operations as `azuracast` user
#
USER azuracast
WORKDIR /var/azuracast/www
COPY --chown=azuracast:azuracast ./composer.json ./composer.lock ./
RUN composer install \
--no-dev \
--no-ansi \
--no-autoloader \
--no-interaction
COPY --chown=azuracast:azuracast . .
RUN composer dump-autoload --optimize --classmap-authoritative \
&& touch /var/azuracast/.docker
VOLUME ["/var/azuracast/www_tmp", "/var/azuracast/uploads", "/var/azuracast/backups", "/var/azuracast/sftpgo/persist"]
#
# END Operations as `azuracast` user
#
USER root
EXPOSE 80 2022
# Sensible default environment variables.
ENV LANG="en_US.UTF-8" \
APPLICATION_ENV="production" \
ENABLE_ADVANCED_FEATURES="false" \
MYSQL_HOST="mariadb" \
MYSQL_PORT=3306 \
MYSQL_USER="azuracast" \
MYSQL_PASSWORD="azur4c457" \
MYSQL_DATABASE="azuracast" \
ENABLE_REDIS="true" \
REDIS_HOST="redis" \
REDIS_PORT=6379 \
REDIS_DB=1 \
NGINX_RADIO_PORTS="default" \
NGINX_WEBDJ_PORTS="default" \
PREFER_RELEASE_BUILDS="false" \
COMPOSER_PLUGIN_MODE="false" \
ADDITIONAL_MEDIA_SYNC_WORKER_COUNT=0 \
PROFILING_EXTENSION_ENABLED=0 \
PROFILING_EXTENSION_ALWAYS_ON=0 \
PROFILING_EXTENSION_HTTP_KEY=dev \
PROFILING_EXTENSION_HTTP_IP_WHITELIST=*
# Entrypoint and default command
ENTRYPOINT ["/usr/local/bin/uptime_wait"]
CMD ["/usr/local/bin/my_init"]