forked from ppy/osu-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.deployment
61 lines (49 loc) · 1.13 KB
/
Dockerfile.deployment
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
FROM ubuntu:20.04
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
composer \
jhead \
nginx \
php-common \
php-curl \
php-fpm \
php-gd \
php-intl \
php-json \
php-mbstring \
php-mysql \
php-redis \
php-sqlite3 \
php-tokenizer \
php-xml \
php-zip \
yarnpkg \
zip
WORKDIR /app
COPY composer.json composer.lock ./
RUN composer install --no-autoloader --no-dev
COPY package.json yarn.lock ./
RUN yarnpkg
RUN rm -f /var/log/nginx/access.log /var/log/nginx/error.log && \
ln -s /dev/stdout /var/log/nginx/access.log && \
ln -s /dev/stderr /var/log/nginx/error.log
COPY . .
RUN mkdir -p bootstrap/cache storage/framework/views
RUN composer dump-autoload
ARG APP_URL
ARG DOCS_URL
ARG PAYMENT_SANDBOX
ARG SHOPIFY_DOMAIN
ARG SHOPIFY_STOREFRONT_TOKEN
RUN yarnpkg production
RUN rm -rf node_modules
ARG GIT_SHA
RUN printf "%s" "$GIT_SHA" > version
RUN useradd -m osuweb
RUN chown -R osuweb bootstrap/cache storage /var/lib/nginx
USER osuweb
ENV LOG_CHANNEL stderr
EXPOSE 8000
EXPOSE 9000
ENTRYPOINT ["/app/docker/deployment/entrypoint.sh"]
CMD ["php"]