File tree Expand file tree Collapse file tree 4 files changed +61
-3
lines changed Expand file tree Collapse file tree 4 files changed +61
-3
lines changed Original file line number Diff line number Diff line change @@ -90,8 +90,9 @@ COPY ./usr/local/etc/php/ /usr/local/etc/php/
90
90
COPY ./usr/local/etc/php-fpm.d/ /usr/local/etc/php-fpm.d/
91
91
92
92
# configure composer
93
- ENV COMPOSER_ALLOW_SUPERUSER=1
94
- ENV PATH="$PATH:./vendor/bin:~/.composer/vendor/bin"
93
+ ENV COMPOSER_ALLOW_SUPERUSER=1 \
94
+ COMPOSER_MEMORY_LIMIT=-1
95
+ ENV PATH="$PATH:/opt/app/vendor/bin:~/.composer/vendor/bin"
95
96
RUN composer global require hirak/prestissimo
96
97
97
98
# configure yarn
@@ -100,6 +101,7 @@ RUN yarn config set strict-ssl false && \
100
101
101
102
# copy home folder and make run scripts executable
102
103
COPY ./home/app/ /home/app/
104
+ COPY ./root/.bashrc /root/
103
105
RUN find /home/app -name "run-*.sh" -exec chmod -v +x {} \;
104
106
105
107
# run the application
Original file line number Diff line number Diff line change 1
- MIT License
1
+ # MIT License
2
2
3
3
Copyright (c) Sourceboat GmbH & Co. KG < info@sourceboat.com >
4
4
Original file line number Diff line number Diff line change @@ -14,6 +14,61 @@ A highly opinionated docker image which aims to be perfectly suited to run our L
14
14
15
15
## Usage
16
16
17
+ ### Development
18
+
19
+ Create a ` Dockerfile ` with the following contents (and adjust version tag):
20
+
21
+ ```
22
+ FROM sourceboat/docker-laravel:x.x.x
23
+
24
+ # install yarn dependencies
25
+ COPY package.json yarn.* ./
26
+ RUN yarn install --pure-lockfile
27
+
28
+ # copy application
29
+ COPY . ./
30
+
31
+ # install composer dependencies
32
+ RUN composer install -d /opt/app --prefer-dist --no-progress --no-interaction --optimize-autoloader
33
+
34
+ # create storage symlink
35
+ RUN php artisan storage:link
36
+
37
+ # build assets
38
+ RUN yarn production
39
+ ```
40
+
41
+ Create a ` docker-compose.yml ` with the following contents:
42
+
43
+ ```
44
+ version: '3.7'
45
+ services:
46
+ app:
47
+ build: .
48
+ restart: unless-stopped
49
+ environment:
50
+ - PHP_OPCACHE_VALIDATE_TIMESTAMPS=1
51
+ volumes:
52
+ - ./:/opt/app:cached
53
+ ports:
54
+ - "8080:8080"
55
+ depends_on:
56
+ - mysql
57
+ mysql:
58
+ image: mysql:8.0
59
+ environment:
60
+ - "MYSQL_ROOT_PASSWORD=secret"
61
+ - "MYSQL_DATABASE=default"
62
+ ```
63
+
64
+ Add more services (e.g. ` redis ` ) if needed.
65
+
66
+ Make sure to adjust your ` .env ` accordingly and set ` APP_URL ` to ` http://localhost:8080 ` .
67
+
68
+ Run ` docker-compose up ` to start the services.
69
+
70
+ ### Production
71
+
17
72
` WIP `
18
73
19
74
## Changelog
Original file line number Diff line number Diff line change
1
+ source /home/app/.bashrc
You can’t perform that action at this time.
0 commit comments