fix: docker compose & makefile

This commit is contained in:
Sonny
2023-04-16 19:52:17 +02:00
parent 056a398f25
commit 9db1f93d05
10 changed files with 3939 additions and 1711 deletions

View File

@@ -1,4 +1,4 @@
{ {
"tabWidth": 2, "tabWidth": 4,
"useTabs": false "useTabs": true
} }

View File

@@ -1 +0,0 @@
docker build -f ./Dockerfile -t sonny/my-links ../

View File

@@ -14,11 +14,8 @@ services:
restart: always restart: always
volumes: volumes:
- db_volume_data:/var/lib/postgresql/data - db_volume_data:/var/lib/postgresql/data
environment: env_file:
MYSQL_USER: ${DB_USER} - ../.env
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
networks: networks:
- my_links_net - my_links_net
@@ -28,8 +25,10 @@ services:
ports: ports:
- 3000:3000 - 3000:3000
restart: always restart: always
env_file:
- ../.env
environment: environment:
DATABASE_URL: "mysql://${DB_USER}:${DB_PASSWORD}@my-links-db:3306/${DB_DATABASE}" DATABASE_URL: "mysql://${MYSQL_USER}:${MYSQL_PASSWORD}@my-links-db:3306/${MYSQL_DATABASE}"
depends_on: depends_on:
my-links-db: my-links-db:
condition: service_started condition: service_started

8
docker/makefile Normal file
View File

@@ -0,0 +1,8 @@
start-dev:
docker compose --env-file ../.env -f ./docker-compose-dev.yml up -d
start-prod:
docker-compose --env-file ../.env -f ./docker-compose.yml up -d
build:
docker build -f ./Dockerfile -t sonny/my-links ../

View File

@@ -1 +0,0 @@
docker-compose --env-file ../.env -f ./docker-compose-dev.yml up -d

View File

@@ -1 +0,0 @@
docker-compose --env-file ../.env -f ./docker-compose.yml up -d

View File

@@ -2,8 +2,6 @@ DB_USER="my_user"
DB_PASSWORD="" DB_PASSWORD=""
DB_DATABASE="my-links" DB_DATABASE="my-links"
DATABASE_URL="mysql://${DB_USER}:${DB_PASSWORD}@localhost:3306/${DB_DATABASE}"
NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_URL_INTERNAL=http://localhost:3000 NEXTAUTH_URL_INTERNAL=http://localhost:3000

5594
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -8,28 +8,28 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^4.10.0", "@prisma/client": "^4.12.0",
"@svgr/webpack": "^6.5.1", "@svgr/webpack": "^7.0.0",
"axios": "^1.3.2", "axios": "^1.3.5",
"next": "^13.1.6", "next": "^13.3.0",
"next-auth": "^4.19.2", "next-auth": "^4.22.0",
"next-connect": "^0.13.0", "next-connect": "^0.13.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"react": "^18.2.0", "react": "^18.2.0",
"react-confirm-alert": "^3.0.6", "react-confirm-alert": "^3.0.6",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-select": "^5.7.0", "react-select": "^5.7.2",
"sass": "^1.58.0", "sass": "^1.62.0",
"sharp": "^0.31.3", "sharp": "^0.32.0",
"toastr": "^2.1.4" "toastr": "^2.1.4"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^18.13.0", "@types/node": "^18.15.11",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/react": "^18.0.27", "@types/react": "^18.0.35",
"eslint": "8", "eslint": "8",
"eslint-config-next": "13.1.6", "eslint-config-next": "13.3.0",
"prisma": "^4.10.0", "prisma": "^4.12.0",
"typescript": "4.9.5" "typescript": "5.0.4"
} }
} }