File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed 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
You can’t perform that action at this time.
0 commit comments