Skip to content

Commit 0952991

Browse files
committed
Merge branch 'release/0.4.0'
2 parents 5b388df + 5568fc4 commit 0952991

File tree

4 files changed

+61
-3
lines changed

4 files changed

+61
-3
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ COPY ./usr/local/etc/php/ /usr/local/etc/php/
9090
COPY ./usr/local/etc/php-fpm.d/ /usr/local/etc/php-fpm.d/
9191

9292
# 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"
9596
RUN composer global require hirak/prestissimo
9697

9798
# configure yarn
@@ -100,6 +101,7 @@ RUN yarn config set strict-ssl false && \
100101

101102
# copy home folder and make run scripts executable
102103
COPY ./home/app/ /home/app/
104+
COPY ./root/.bashrc /root/
103105
RUN find /home/app -name "run-*.sh" -exec chmod -v +x {} \;
104106

105107
# run the application

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright (c) Sourceboat GmbH & Co. KG <info@sourceboat.com>
44

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,61 @@ A highly opinionated docker image which aims to be perfectly suited to run our L
1414

1515
## Usage
1616

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+
1772
`WIP`
1873

1974
## Changelog

root/.bashrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
source /home/app/.bashrc

0 commit comments

Comments
 (0)