Commit 1fb686e 1 parent 700b027 commit 1fb686e Copy full SHA for 1fb686e
File tree 11 files changed +140
-58
lines changed
11 files changed +140
-58
lines changed Original file line number Diff line number Diff line change
1
+ /node_modules
2
+ /vendor
3
+
4
+ /public /build
5
+ /public /hot
6
+ /public /storage
7
+
8
+ docker-compose.yml
9
+ docker-compose.prod.yml
10
+ docker-compose.actions.yml
Original file line number Diff line number Diff line change
1
+ APP_PORT=80
2
+ NODE_PORT=5173
3
+ DOCKER_USER=1000:1000
4
+
5
+ STEAM_CLIENT_SECRET=STEAM_API_KEY
6
+ STEAM_REDIRECT_URI="http://localhost/steam/callback"
7
+
8
+ APP_NAME=steam-buddy
9
+ APP_ENV=local
10
+ APP_KEY=
11
+ APP_DEBUG=true
12
+ APP_TIMEZONE=UTC
13
+ APP_URL=http://localhost
14
+
15
+ APP_LOCALE=en
16
+ APP_FALLBACK_LOCALE=en
17
+ APP_FAKER_LOCALE=en_US
18
+
19
+ APP_MAINTENANCE_DRIVER=file
20
+ APP_MAINTENANCE_STORE=database
21
+
22
+ BCRYPT_ROUNDS=12
23
+
24
+ LOG_CHANNEL=stack
25
+ LOG_STACK=single
26
+ LOG_DEPRECATIONS_CHANNEL=null
27
+ LOG_LEVEL=debug
28
+
29
+ DB_CONNECTION=pgsql
30
+ DB_HOST=sb-database
31
+ DB_PORT=5432
32
+ DB_DATABASE=steam_buddy
33
+ DB_USERNAME=postgres
34
+ DB_PASSWORD=password
35
+
36
+ SESSION_DRIVER=redis
37
+ SESSION_LIFETIME=120
38
+ SESSION_ENCRYPT=false
39
+ SESSION_PATH=/
40
+ SESSION_DOMAIN=null
41
+
42
+ BROADCAST_CONNECTION=log
43
+ FILESYSTEM_DISK=local
44
+ QUEUE_CONNECTION=redis
45
+
46
+ CACHE_STORE=redis
47
+ CACHE_PREFIX=
48
+
49
+ MEMCACHED_HOST=127.0.0.1
50
+
51
+ REDIS_CLIENT=predis
52
+ REDIS_HOST=sb-redis
53
+ REDIS_PASSWORD=password
54
+ REDIS_PORT=6379
55
+
56
+ MAIL_MAILER=log
57
+ MAIL_HOST=127.0.0.1
58
+ MAIL_PORT=2525
59
+ MAIL_USERNAME=null
60
+ MAIL_PASSWORD=null
61
+ MAIL_ENCRYPTION=null
62
+ MAIL_FROM_ADDRESS="
[email protected] "
63
+ MAIL_FROM_NAME="${APP_NAME}"
64
+
65
+ AWS_ACCESS_KEY_ID=
66
+ AWS_SECRET_ACCESS_KEY=
67
+ AWS_DEFAULT_REGION=us-east-1
68
+ AWS_BUCKET=
69
+ AWS_USE_PATH_STYLE_ENDPOINT=false
70
+
71
+ VITE_APP_NAME="${APP_NAME}"
Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ jobs:
23
23
run : docker images
24
24
-
25
25
name : Save Docker images to tar
26
- run : docker save -o images .tar steam-buddy_php:latest steam-buddy_node :latest
26
+ run : docker save -o image .tar steam-buddy_php:latest
27
27
-
28
28
name : Upload tar artifact
29
29
uses : actions/upload-artifact@v2
30
30
with :
31
- name : images .tar
32
- path : images .tar
31
+ name : image .tar
32
+ path : image .tar
33
33
34
34
release :
35
35
needs : [build]
59
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
60
with :
61
61
upload_url : ${{ steps.create_release.outputs.upload_url }}
62
- asset_path : images .tar/images .tar
63
- asset_name : images .tar
62
+ asset_path : image .tar/image .tar
63
+ asset_name : image .tar
64
64
asset_content_type : application/tar
Original file line number Diff line number Diff line change 16
16
-
17
17
name : Checkout
18
18
uses : actions/checkout@v2
19
- -
20
- name : Create .env
21
- run : cp .env.example .env
22
- -
23
- name : Build docker
24
- run : docker compose -f ./docker-compose.actions.yml build
25
19
-
26
20
name : Start docker
27
- run : docker compose -f ./docker-compose. actions.yml up -d
21
+ run : make actions
28
22
-
29
23
name : Run backend tests
30
24
run : docker compose exec php composer test
Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ check-env-file:
7
7
exit 1; \
8
8
fi ; \
9
9
10
- build :
11
- @docker-compose down
12
- @docker-compose -f ./docker-compose.prod.yml build
13
- @docker-compose -f ./docker-compose.prod.yml up -d
10
+ actions :
11
+ @docker compose -f ./docker-compose.actions.yml up -d
12
+ @docker compose -f ./docker-compose.actions.yml exec -it action bash /app/docker/actions/init.sh
13
+
14
+ prod :
15
+ @docker compose -f ./docker-compose.prod.yml up -d
16
+ @docker compose -f ./docker-compose.prod.yml exec -it php bash
14
17
15
18
dev :
16
19
@docker compose up -d
Original file line number Diff line number Diff line change 1
1
version : ' 3.8'
2
2
services :
3
- php :
4
- container_name : sb-php
3
+ action :
4
+ container_name : sb-action
5
5
working_dir : /app
6
6
user : $DOCKER_USER
7
- image : steam-buddy_php
8
7
tty : true
9
8
build :
10
9
context : .
11
- dockerfile : ./docker/production/php/Dockerfile
12
-
13
- node :
14
- image : steam-buddy_node
15
- build :
16
- context : .
17
- dockerfile : ./docker/production/node/Dockerfile
18
- container_name : sb-node
19
- working_dir : /app
20
- user : $DOCKER_USER
21
- tty : true
22
-
10
+ dockerfile : ./docker/actions/Dockerfile
11
+ volumes :
12
+ - .:/app
13
+ - ./docker/actions/database.sqlite:/app/database.sqlite
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ services:
20
20
user : $DOCKER_USER
21
21
volumes :
22
22
- app_files:/app
23
+ - ./.env:/app/.env
23
24
image : steam-buddy_php
24
25
build :
25
26
context : .
@@ -64,22 +65,6 @@ services:
64
65
timeout : 5s
65
66
retries : 5
66
67
67
- node :
68
- image : steam-buddy_node
69
- build :
70
- context : .
71
- dockerfile : ./docker/production/node/Dockerfile
72
- container_name : sb-node
73
- working_dir : /app
74
- user : $DOCKER_USER
75
- tty : true
76
- ports :
77
- - $NODE_PORT:$NODE_PORT
78
- volumes :
79
- - app_files:/app
80
- networks :
81
- - app-net
82
-
83
68
networks :
84
69
app-net :
85
70
driver : bridge
Original file line number Diff line number Diff line change
1
+ FROM php:8.2-alpine3.16
2
+
3
+ COPY --from=composer/composer:2.4.4 /usr/bin/composer /usr/bin/composer
4
+
5
+ RUN apk update
6
+ RUN apk --no-cache add bash zip git libzip-dev libpng-dev libpq-dev nodejs-current npm bash
7
+
8
+ RUN docker-php-ext-install zip gd
9
+ RUN docker-php-ext-configure zip
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ cp /app/.env.actions /app/.env
4
+ echo " " > /app/database.sqlite
5
+
6
+ composer install
7
+
8
+ npm install
9
+ npm run build
10
+
11
+ php artisan key:generate
12
+ php artisan migrate
13
+ php artisan cache:clear
14
+ php artisan config:clear
15
+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ FROM node:20-alpine AS frontend
2
+
3
+ RUN apk update
4
+ RUN apk --no-cache add bash git
5
+
6
+ COPY . /app
7
+ WORKDIR /app
8
+ RUN npm install
9
+ RUN npm run build
10
+
11
+ ENTRYPOINT ["docker-entrypoint.sh" ]
12
+
1
13
FROM php:8.2-fpm-alpine3.16
2
14
3
15
COPY --from=composer/composer:2.4.4 /usr/bin/composer /usr/bin/composer
@@ -9,6 +21,9 @@ RUN docker-php-ext-install zip gd pdo pdo_pgsql
9
21
RUN docker-php-ext-configure zip
10
22
11
23
COPY . /app
24
+ RUN rm -rf /app/public
25
+ COPY --from=frontend /app/public /app/public
26
+
12
27
WORKDIR /app
13
28
14
29
RUN composer install
You can’t perform that action at this time.
0 commit comments