Skip to content

Commit

Permalink
ci: fix deployment for railway
Browse files Browse the repository at this point in the history
  • Loading branch information
limwa committed Jul 29, 2024
1 parent 00edc06 commit 67c30e3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 41 deletions.
35 changes: 0 additions & 35 deletions .env.development

This file was deleted.

2 changes: 1 addition & 1 deletion .env.railway.encrypted
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJpdiI6IjV3ZmRHa2ZUMDhUbDQ2UVVUc3VkY0E9PSIsInZhbHVlIjoiU0R5MzIzQmpBekFXbTVGb3JRdU9aNGhQZVAxbGZCaEhtNkFUeTlMaDZnNU1ZcEZkU1lwS0dEMENYbzZkeGU0eW93VDN2NytlamVRM1NTTllqUzI3VzBVUWxLVm1pRThxWTdWdTdGZnpYd3hkNk9mMFRXa0JTaUVva1BHbkdCTERndmZDTkdLMWprRURVWUk3R3lKbWQyRTRra3V3WG9YeURWTlpHQ0VpVDZ2aHQxTG5oRFEraEsydkJvalFiWmdFV3NiOHFGSVN5V1QyQVhOZzRRa1FDUGZSZXg3ZS9HRURUeVJzM2ZPQkNuNDZscXdtZmtUQkxXUWNYT3BsVFZzenMzamdWOHZpMWlwMWlzSDRtLytBUHdYN25OL2Y1M1dIU1lzWko5VlFPV0paYlJQekRVMWZzK0NJZ3hnNXVHREtseFBNc2ZWZWpKeU9JY2dlTGVBT0hMZ2pnSHhSTUxSWGZmeUlLMC9WN1l1YU5ZRTUwUmE5em9ZcTJuVzl2YmV4OGovR3NhMjFpWitIZ0ZsbTRHQzhJcWZsMkllQ2NsWitGVk5DakFESjFZbC9ZTFV0a2NlZDlLNHlhYTIvMnp2WHp2YmdLRGtsdFRQL1JVZHBRT0xQVjJaelpmKzlQRWNRR3ZTKzJJOG9BKzg1MWdRUVRzT1YrcHpKRHRDSFA0SWxTTmFITVFHT09pbTArRG01UUpDZkhnSTJhb1lUeHN0Nmk3bWRpZEV3ampuZkN1NGYvanlDdEdkOVBFR3BGMUpVam8xeHM2ekRQdF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ZoaHRUeXNDTVEzd0hiTVNsc2NzMWRhOUJpSUJFQjg3dlRkdHE4WTkvdmVudFZ2YjZtY1Ryd1dNWjZ5SGxWZkhMeEhFR2MycSIsIm1hYyI6ImFiZTIyM2NkOTYxYmNkNDA4ZWViZWVlOGIyY2IzNGEwMGFlOGQ4NGM1MGYwNDY2ZWE4ODY5YjllN2ZiOWUxZTgiLCJ0YWciOiIifQ==
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ services:
dockerfile: ./dockerfiles/Dockerfile.website
target: deploy
args:
- LARAVEL_ENV=development
- LARAVEL_ENV_FILE=.env.development
- LARAVEL_ENV=local
- LARAVEL_ENV_FILE=.env
ports:
- '80:80'
networks:
Expand All @@ -43,6 +43,8 @@ services:
- pgsql
- redis
- meilisearch
environment:
- APP_URL=http://localhost
pgsql:
image: 'postgres:16'
ports:
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/Dockerfile.website
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ ENV APP_ENV=${LARAVEL_ENV}

RUN [ -z "${LARAVEL_ENV_FILE_KEY}" ] || ( mv .env.${LARAVEL_ENV} .env.${LARAVEL_ENV}.encrypted && php artisan env:decrypt -n --env=${LARAVEL_ENV} --key=${LARAVEL_ENV_FILE_KEY} )
RUN php artisan storage:link -n
RUN php artisan config:cache -n
RUN php artisan event:cache -n
RUN php artisan route:cache -n
RUN php artisan view:cache -n
RUN php artisan optimize -n

RUN rm .env.${LARAVEL_ENV}*
COPY --chown=nobody ./etc/entrypoint.sh /entrypoint.sh
CMD [ "/entrypoint.sh" ]
9 changes: 9 additions & 0 deletions etc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -e

# Cache config and other stuff
php artisan optimize -n
rm .env.${LARAVEL_ENV}*

/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf

0 comments on commit 67c30e3

Please sign in to comment.