Skip to content

Commit

Permalink
Issue 60 and 53 (#66)
Browse files Browse the repository at this point in the history
* Move .env.example

* No need to set user in development

* Update packages

* Fix compile warnings

* Issues #60 #53
  • Loading branch information
radguru committed Nov 12, 2023
1 parent f7f7ee4 commit 40224ed
Show file tree
Hide file tree
Showing 14 changed files with 7,011 additions and 5,504 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
volumes:
- ../api:/var/www/html
working_dir: /var/www/html
command: /bin/sh -c "chown www-data:www-data entrypoint.sh && chmod +x entrypoint.sh && sh entrypoint.sh"
command: /bin/sh -c "sh entrypoint.sh"
environment:
APP_ENV: ${APP_ENV}
APP_DEBUG: ${APP_DEBUG}
Expand All @@ -43,7 +43,7 @@ services:
networks:
- skynet
db:
image: mysql:8
image: mysql:8.2.0
ports:
- "${DB_PORT}:3306"
environment:
Expand Down
4 changes: 2 additions & 2 deletions api/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ RUN set -xe \
# Set working directory
WORKDIR /var/www/html

# Change the user to www-data
USER www-data
# Install dependencies
RUN composer install --no-dev --optimize-autoloader
13 changes: 0 additions & 13 deletions api/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
#!/bin/bash

# Set permissions
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache

chown www-data:www-data ./entrypoint.sh
chmod +x ./entrypoint.sh

# Install dependencies
composer install --no-dev --optimize-autoloader

# Sleep for wait to db container
sleep 20;

# Run key:generate
# php artisan key:generate

Expand Down
1 change: 0 additions & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ APP_DEBUG=false
HOST=localhost

APP_PORT=8895
API_PORT=8085

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand Down
10 changes: 5 additions & 5 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
image: ghcr.io/budgetbee/budgetbee/proxy:latest
command: nginx -g "daemon off;"
ports:
- "8201:80"
- "${APP_PORT}:80"
depends_on:
- webserver
- web
Expand All @@ -17,9 +17,9 @@ services:
command: sh entrypoint.sh
environment:
DB_HOST: db
DB_DATABASE: "budgetbee"
DB_USERNAME: "budgetbee_user"
DB_PASSWORD: "budgetbee_password"
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
depends_on:
db:
condition: service_healthy
Expand All @@ -32,7 +32,7 @@ services:
networks:
- skynet
db:
image: mysql:8
image: mysql:8.2.0
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
Expand Down
12 changes: 7 additions & 5 deletions web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# pull official base image
FROM node:20.3-slim
FROM node:21-slim

# set working directory
WORKDIR /var/www/html

# install app dependencies
COPY package.json package-lock.json ./
RUN npm install

# add app
COPY . .

# install app dependencies
RUN rm -rf node_modules
# COPY package.json package-lock.json ./
RUN npm ci


# port
EXPOSE 3000

Expand Down
2 changes: 1 addition & 1 deletion web/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pull official base image
FROM node:20.3-slim
FROM node:21-slim

# set working directory
WORKDIR /var/www/html
Expand Down
Loading

0 comments on commit 40224ed

Please sign in to comment.