forked from HiEventsDev/Hi.Events
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.all-in-one
More file actions
57 lines (39 loc) · 1.63 KB
/
Dockerfile.all-in-one
File metadata and controls
57 lines (39 loc) · 1.63 KB
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
FROM node:22-alpine AS node-frontend
WORKDIR /app/frontend
RUN apk add --no-cache yarn
# Increase network timeout for slow ARM emulation builds
RUN yarn config set network-timeout 600000
COPY ./frontend/package.json ./frontend/yarn.lock ./
COPY ./frontend .
COPY ./VERSION /app/VERSION
RUN yarn install --network-timeout 600000 --frozen-lockfile && yarn build
# Use stable multi-arch serversideup/php image
FROM serversideup/php:8.3-fpm-alpine
ENV PHP_OPCACHE_ENABLE=1
# Switch to root for installing extensions and packages
USER root
RUN install-php-extensions intl
RUN apk add --no-cache nodejs yarn nginx supervisor dos2unix
COPY --from=node-frontend /app/frontend /app/frontend
COPY ./backend /app/backend
COPY ./VERSION /app/backend/VERSION
RUN mkdir -p /app/backend/bootstrap/cache \
&& mkdir -p /app/backend/storage \
&& chown -R www-data:www-data /app/backend \
&& find /app/backend -type d -exec chmod 755 {} \; \
&& find /app/backend -type f -exec chmod 644 {} \; \
&& chmod -R 755 /app/backend/storage /app/backend/bootstrap/cache \
&& composer install --working-dir=/app/backend \
--ignore-platform-reqs \
--no-interaction \
--no-dev \
--optimize-autoloader \
--prefer-dist \
&& chmod -R 755 /app/backend/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer
COPY ./docker/all-in-one/nginx/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/all-in-one/supervisor/supervisord.conf /etc/supervisord.conf
COPY ./docker/all-in-one/scripts/startup.sh /startup.sh
RUN dos2unix /startup.sh && chmod +x /startup.sh
EXPOSE 80
WORKDIR /app
CMD ["/startup.sh"]