Skip to content

Commit e1f05b2

Browse files
authored
Merge pull request #2 from takyafumin/fix/no-sqlite-file-error
ECSタスクのコマンドを追加し、SQLiteデータベースの設定をDockerfileに追加
2 parents 89c91ce + 90c5e9a commit e1f05b2

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.aws/ecs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Resources:
130130
awslogs-region: !Ref AWS::Region
131131
awslogs-stream-prefix: ecs
132132
WorkingDirectory: /var/www
133+
Command:
134+
- php artisan serve --host=0.0.0.0 --port=8000
133135

134136
# --------------------------
135137
# ECS サービス

.docker/php/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ WORKDIR /var/www
4141
# アプリケーションファイルをコピー
4242
COPY ./apps /var/www
4343

44+
# SQLiteの設定
45+
RUN mkdir -p /var/www/database \
46+
&& touch /var/www/database/database.sqlite \
47+
&& chmod 777 /var/www/database/database.sqlite
48+
4449
# 依存関係のインストールとセキュリティ設定
4550
ENV COMPOSER_ALLOW_SUPERUSER=1
4651
RUN composer install \

0 commit comments

Comments
 (0)