Skip to content

Commit 8e4fc0d

Browse files
authored
Merge pull request #3 from circleci-jkzilla/jkg/142219
Jkg/142219
2 parents 222933c + d267224 commit 8e4fc0d

File tree

3 files changed

+71
-18
lines changed

3 files changed

+71
-18
lines changed

.circleci/env-script.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ set +a
99

1010
printenv
1111

12-
response=$(curl -X POST --url 'https://circleci.com/api/v2/context' \
13-
-H 'Circle-Token: f7aa3b819623c1cc786dd39bb9e09742c47fea3c' \
14-
-H 'content-type: application/json' \
15-
-d '{"name":"php-context2","owner":{"id":"5d18d3c7-f8c4-4c5f-a691-b730e67047d3","type":"organization"}}' --write-out '%{http_code}' --silent --output /dev/null servername)
16-
context_id=${ response | jq -r '.id' }
17-
echo "Context ID: $context_id"
12+
response=$(curl -X POST --url 'https://circleci.com/api/v2/context' -H 'Circle-Token: f7aa3b819623c1cc786dd39bb9e09742c47fea3c' -H 'Content-Type: application/json' -d '{"name":"php-context6","owner":{"id":"5d18d3c7-f8c4-4c5f-a691-b730e67047d3","type":"organization"}}')
13+
echo $response
14+
context_id=$(echo $response | jq -r '.id')
15+
echo $context_id
1816
env | while IFS= read -r line; do
1917
value=${line#*=}
2018
name=${line%%=*}
2119
echo "V: $value"
2220
echo "N: $name"
23-
# "message" : "Invalid JSON body." nov 27
21+
22+
# "message" : "Invalid parameter: the string '{9be0f072-80cd-4c6e-8f3d-0a4b2a42eac6}' is not a valid UUID"
23+
2424
curl --request PUT \
25-
--url https://circleci.com/api/v2/context/%7B$context_id%7D/environment-variable/$name \
25+
--url https://circleci.com/api/v2/context/$context_id/environment-variable/$name \
2626
-H 'Circle-Token: f7aa3b819623c1cc786dd39bb9e09742c47fea3c' \
2727
-H 'content-type: application/json' \
28-
--data '{"value":$value}'
28+
--data '{"value":"$value"}'
2929
done
3030

3131
# Create new context for PHP application environment variables

.env.example

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
APP_NAME=Laravel
2+
APP_ENV=local
3+
APP_KEY=
4+
APP_DEBUG=true
5+
APP_URL=http://localhost
6+
7+
LOG_CHANNEL=stack
8+
LOG_DEPRECATIONS_CHANNEL=null
9+
LOG_LEVEL=debug
10+
11+
DB_CONNECTION=mysql
12+
DB_HOST=127.0.0.1
13+
DB_PORT=3306
14+
DB_DATABASE=laravel
15+
DB_USERNAME=root
16+
DB_PASSWORD=
17+
18+
BROADCAST_DRIVER=log
19+
CACHE_DRIVER=file
20+
FILESYSTEM_DISK=local
21+
QUEUE_CONNECTION=sync
22+
SESSION_DRIVER=file
23+
SESSION_LIFETIME=120
24+
25+
MEMCACHED_HOST=127.0.0.1
26+
27+
REDIS_HOST=127.0.0.1
28+
REDIS_PASSWORD=null
29+
REDIS_PORT=6379
30+
31+
MAIL_MAILER=smtp
32+
MAIL_HOST=mailpit
33+
MAIL_PORT=1025
34+
MAIL_USERNAME=null
35+
MAIL_PASSWORD=null
36+
MAIL_ENCRYPTION=null
37+
MAIL_FROM_ADDRESS="[email protected]"
38+
MAIL_FROM_NAME="${APP_NAME}"
39+
40+
AWS_ACCESS_KEY_ID=
41+
AWS_SECRET_ACCESS_KEY=
42+
AWS_DEFAULT_REGION=us-east-1
43+
AWS_BUCKET=
44+
AWS_USE_PATH_STYLE_ENDPOINT=false
45+
46+
PUSHER_APP_ID=
47+
PUSHER_APP_KEY=
48+
PUSHER_APP_SECRET=
49+
PUSHER_HOST=
50+
PUSHER_PORT=443
51+
PUSHER_SCHEME=https
52+
PUSHER_APP_CLUSTER=mt1
53+
54+
VITE_APP_NAME="${APP_NAME}"
55+
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
56+
VITE_PUSHER_HOST="${PUSHER_HOST}"
57+
VITE_PUSHER_PORT="${PUSHER_PORT}"
58+
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
59+
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

Dockerfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,17 @@ FROM cimg/php:8.2.12
33

44
# Ejecutar actualización e instalar wget
55
RUN sudo apt update && sudo apt install -y wget
6-
7-
# Descargar archivo .env usando la variable SECURE_KEY
8-
RUN ls -al
9-
RUN pwd
6+
RUN cp ~/.env.example /app/.env
107
# Copiar los archivos del proyecto
118
WORKDIR /app
12-
RUN ls -al
13-
RUN pwd
149

1510
COPY . /app/
1611
# Instalar dependencias de Composer
1712
COPY composer.json composer.lock /app/
1813
# set workdir
1914
RUN sudo mkdir -p vendor
20-
RUN composer update
21-
# RUN sudo chmod -R 777 ./bootstrap/cache ./storage
22-
# RUN
15+
RUN sudo composer update
16+
2317
RUN sudo composer install -n --prefer-dist
2418

2519
# Ejecutar comandos de Laravel para configuración

0 commit comments

Comments
 (0)