-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d2a4a4
commit b10e953
Showing
14 changed files
with
1,057 additions
and
1,445 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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
COMPOSE_FILES := postgres surrealdb postgres.dev surrealdb.dev | ||
|
||
.PHONY: $(addprefix up-,$(COMPOSE_FILES)) $(addprefix down-,$(COMPOSE_FILES)) | ||
|
||
$(addprefix up-,$(COMPOSE_FILES)): | ||
make down-$(subst up-,,$@) | ||
docker compose -f docker-compose-$(subst up-,,$@).yml up --build --pull always -d | ||
|
||
$(addprefix down-,$(COMPOSE_FILES)): | ||
docker compose -f docker-compose-$(subst down-,,$@).yml down --volumes --remove-orphans | ||
docker network prune -f |
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,36 +1,35 @@ | ||
version: "3" | ||
services: | ||
next-url-shortener: | ||
container_name: next-url-shortener | ||
build: . | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- postgres | ||
networks: | ||
- postgres | ||
next-url-shortener: | ||
container_name: next-url-shortener | ||
build: . | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- postgres | ||
networks: | ||
- postgres | ||
|
||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
env_file: | ||
- .env | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: 1 | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- ./data/postgres:/var/lib/postgresql/data | ||
networks: | ||
- postgres | ||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
env_file: | ||
- .env | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: 1.0 | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- ./data/postgres:/var/lib/postgresql/data | ||
networks: | ||
- postgres | ||
|
||
volumes: | ||
data: | ||
data: | ||
|
||
networks: | ||
postgres: | ||
postgres: |
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,36 +1,35 @@ | ||
version: "3" | ||
services: | ||
next-url-shortener: | ||
container_name: next-url-shortener | ||
image: ghcr.io/nexveridian/next-url-shortener:latest | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- postgres | ||
networks: | ||
- postgres | ||
next-url-shortener: | ||
container_name: next-url-shortener | ||
image: ghcr.io/nexveridian/next-url-shortener:latest | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- postgres | ||
networks: | ||
- postgres | ||
|
||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
env_file: | ||
- .env | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: 1 | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- ./data/postgres:/var/lib/postgresql/data | ||
networks: | ||
- postgres | ||
postgres: | ||
container_name: postgres | ||
image: postgres:latest | ||
env_file: | ||
- .env | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: 1.0 | ||
ports: | ||
- 5432:5432 | ||
volumes: | ||
- ./data/postgres:/var/lib/postgresql/data | ||
networks: | ||
- postgres | ||
|
||
volumes: | ||
data: | ||
data: | ||
|
||
networks: | ||
postgres: | ||
postgres: |
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,43 +1,50 @@ | ||
version: "3" | ||
services: | ||
nextjs: | ||
build: . | ||
env_file: | ||
- .env | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- surrealdb | ||
networks: | ||
- surrealdb | ||
nextjs: | ||
container_name: next-url-shortener | ||
build: . | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 | ||
depends_on: | ||
- surrealdb | ||
networks: | ||
surrealdb: | ||
# ipv4_address: 172.20.0.2 | ||
|
||
surrealdb: | ||
container_name: surrealdb | ||
image: surrealdb/surrealdb:latest-dev | ||
env_file: | ||
- .env | ||
entrypoint: | ||
- /surreal | ||
- start | ||
- --user | ||
- $DB_USER | ||
- --pass | ||
- $DB_PASSWORD | ||
- file:/data/surrealdb | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: "1" | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- ./data:/data | ||
networks: | ||
- surrealdb | ||
surrealdb: | ||
container_name: surrealdb | ||
image: surrealdb/surrealdb:v2.0.0-alpha.9 | ||
env_file: | ||
- .env | ||
entrypoint: | ||
- /surreal | ||
- start | ||
- --user | ||
- $DB_USER | ||
- --pass | ||
- $DB_PASSWORD | ||
- file:/data/surrealdb | ||
user: root | ||
restart: always | ||
deploy: | ||
resources: | ||
reservations: | ||
cpus: 1.0 | ||
ports: | ||
- 8000:8000 | ||
volumes: | ||
- ./data:/data | ||
networks: | ||
surrealdb: | ||
# ipv4_address: 172.20.0.1 | ||
|
||
volumes: | ||
data: | ||
data: | ||
|
||
networks: | ||
surrealdb: | ||
surrealdb: | ||
# ipam: | ||
# config: | ||
# - subnet: 172.20.0.0/16 | ||
# gateway: 172.20.0.254 |
Oops, something went wrong.