forked from 42Seoul-LastDance/ft_transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from 42Seoul-LastDance/feature/auth
Feature/auth
- Loading branch information
Showing
20 changed files
with
553 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,75 @@ | ||
version: "3" | ||
version: '3' | ||
|
||
services: | ||
next: | ||
container_name: next | ||
build: ./services/next | ||
image: next:ts | ||
volumes: | ||
- next:/usr/app/srcs | ||
networks: | ||
- my_network | ||
env_file: | ||
- ./.env | ||
ports: | ||
- "4242:3000" | ||
restart: always | ||
depends_on: | ||
- postgresql | ||
next: | ||
container_name: next | ||
build: ./services/next | ||
image: next:ts | ||
volumes: | ||
- next:/usr/app/srcs | ||
networks: | ||
- my_network | ||
env_file: | ||
- ./.env | ||
ports: | ||
- '4242:4242' | ||
restart: always | ||
depends_on: | ||
- postgresql | ||
|
||
nest: | ||
container_name: nest | ||
build: ./services/nest | ||
image: nest:ts | ||
volumes: | ||
- nest:/usr/app/srcs | ||
networks: | ||
- my_network | ||
env_file: | ||
- ./.env | ||
ports: | ||
- "3000:3000" | ||
restart: always | ||
|
||
postgresql: | ||
container_name: postgresql | ||
build: | ||
context: ./services/postgresql | ||
args: | ||
- DB_NAME=${DB_NAME} | ||
- POSTGRES_USER_ID=${POSTGRES_USER_ID} | ||
- POSTGRES_USER_PASSWORD=${POSTGRES_USER_PASSWORD} | ||
image: db:ts | ||
expose: | ||
- "5432" | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
networks: | ||
- my_network | ||
restart: always | ||
nest: | ||
container_name: nest | ||
build: ./services/nest | ||
image: nest:ts | ||
volumes: | ||
- nest:/usr/app/srcs | ||
networks: | ||
- my_network | ||
env_file: | ||
- ./.env | ||
ports: | ||
- '3000:3000' | ||
restart: always | ||
|
||
postgresql: | ||
container_name: postgresql | ||
build: | ||
context: ./services/postgresql | ||
args: | ||
- DB_NAME=${DB_NAME} | ||
- POSTGRES_USER_ID=${POSTGRES_USER_ID} | ||
- POSTGRES_USER_PASSWORD=${POSTGRES_USER_PASSWORD} | ||
image: db:ts | ||
expose: | ||
- '5432' | ||
volumes: | ||
- db:/var/lib/postgresql/data | ||
environment: | ||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
networks: | ||
- my_network | ||
restart: always | ||
|
||
volumes: | ||
next: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/next' | ||
nest: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/nest' | ||
db: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/postgresql' | ||
next: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/next' | ||
nest: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/nest' | ||
db: | ||
driver: local | ||
driver_opts: | ||
type: none | ||
o: bind | ||
device: '${PWD}/srcs/postgresql' | ||
|
||
networks: | ||
my_network: | ||
driver: bridge | ||
my_network: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
npm install --prefix srcs --save @nestjs/cli | ||
npm install --prefix srcs | ||
npm run --prefix srcs start:dev | ||
npm run --prefix srcs start:dev --cache-clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
line_address=$(grep -n "#local BACK Address" .env | cut -d: -f1) | ||
if [ -z "$line_address" ]; then | ||
IPADD="$(ifconfig | grep "inet 10." | awk '{print $2}')" | ||
echo "" >> .env | ||
echo "#local BACK Address" >> .env | ||
echo "BACK_ADDR=http://$IPADD:3000" >> .env | ||
echo "#local FRONT Address" >> .env | ||
echo "FRONT_ADDR=http://$IPADD:4242" >> .env | ||
echo "#local callback Address" >> .env | ||
echo "FT_CALLBACK=http://$IPADD:3000/auth/callback" >> .env | ||
fi |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.