-
Notifications
You must be signed in to change notification settings - Fork 98
Docker fix #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Docker fix #297
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
658fb2a
feat: ✨ Add new branch to work with Docker
gmargriff d9d3a75
fix: 🐛 Missing SQL folder when starting server
gmargriff 2a86353
fix: 🐛 Changing SQL queries due to capital letters conflict
gmargriff f7dd52c
feat: :art: Add .env file for configuring docker-compose
gmargriff cfa2971
docs: :memo: Improve documentation on docker and client setup
gmargriff 1f2e059
fix: :bug: Use ENVIRONMENT variable from .env file to run correct ser…
gmargriff 751c0fb
Merge branch 'master' into docker
gmargriff 681cdd0
fix: :zap: Re-enable console commands on Windows systems
gmargriff 840cfb7
revert: :card_file_box: Revert removal of SQL files from master branch
gmargriff 06a6f25
refactor: :recycle: Necessary changes in Merged SQL files to keep SQL…
gmargriff 2bb0a58
fix: :zap: Make sure database started before starting servers
gmargriff cc5879c
docs: :memo: Improve documentation ordering for branch specifics
gmargriff 68eec32
Merge pull request #1 from gmargriff/docker
gmargriff c55cd66
Merge pull request #2 from NoCode-NoLife/master
gmargriff b724216
Merge pull request #3 from gmargriff/docker
gmargriff 5cedc96
Merge branch 'NoCode-NoLife:master' into master
gmargriff 2d3b785
Merge branch 'NoCode-NoLife:master' into master
gmargriff fbfd852
Merge branch 'NoCode-NoLife:master' into master
gmargriff c9de2e7
Merge branch 'NoCode-NoLife:master' into master
gmargriff 7ffd8b3
Merge branch 'NoCode-NoLife:master' into master
gmargriff e45283e
more commands
y4my4my4m bf27246
Update ChatCommands.Handlers.cs
y4my4my4m 54b0d11
Update ChatCommands.Handlers.cs
y4my4my4m 90b9773
Update commands.conf
y4my4my4m 6b5d9f5
Merge remote-tracking branch 'y4my4m/master' into new-branch
y4my4my4m bddca91
update
y4my4my4m 13f3487
Merge branch 'master' of github.com:NoCode-NoLife/melia into new-branch
y4my4my4m 875c132
temp fix
y4my4my4m e93bcfe
git ignore all again
y4my4my4m File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| # ENVIRONMENT determines the folder where we'll look for binaries. | ||
| # If you're using Release, change the build command to: docker compose run --rm melia-server dotnet publish | ||
| # Release performance tends to have better performance, Debug will have more info for development. | ||
|
|
||
| ENVIRONMENT="Debug" # Options: Release | Debug | ||
|
|
||
| # Database password | ||
| MYSQL_ROOT_PASSWORD="123456" # Use a strong password, change in ./user/conf/database.conf too | ||
|
|
||
| # Automatically restart server. If using on-failure, sets amount of retries | ||
| SERVER_RESTART="unless-stopped" # Options: no | unless-stopped | always | on-failure:5 |
This file contains hidden or 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 hidden or 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 hidden or 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,10 @@ | ||
| FROM ubuntu:22.04 | ||
| ARG DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| WORKDIR / | ||
|
|
||
| RUN apt update -y && apt upgrade -y && apt install -y dotnet-sdk-8.0 aspnetcore-runtime-8.0 git php libapache2-mod-php php-cgi php-mysql vim | ||
|
|
||
| WORKDIR /melia | ||
|
|
||
| CMD ["./start", "Debug", "BarracksServer"] |
This file contains hidden or 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,65 @@ | ||
| name: "melia" | ||
| services: | ||
| melia-database: | ||
| container_name: melia-database | ||
| image: mysql:8.3 | ||
| networks: | ||
| - melia-network | ||
| ports: | ||
| - 3306:3306 | ||
| environment: | ||
| - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} | ||
| volumes: | ||
| - ./sql:/docker-entrypoint-initdb.d | ||
| - ./.mysql/:/var/lib/mysql | ||
| restart: ${SERVER_RESTART} | ||
| env_file: | ||
| - ./.env | ||
| healthcheck: | ||
| test: "/usr/bin/mysql --user=root --password=${MYSQL_ROOT_PASSWORD} --execute \"SHOW DATABASES;\"" | ||
| interval: 5s | ||
| timeout: 10s | ||
| retries: 40 | ||
|
|
||
| melia-server: | ||
| container_name: melia-server | ||
| command: "./start ${ENVIRONMENT}" | ||
| # command: "tail -f /dev/null" | ||
| build: "./Servers" | ||
| networks: | ||
| - melia-network | ||
| volumes: | ||
| - ./:/melia | ||
| depends_on: | ||
| melia-database: | ||
| condition: service_healthy | ||
| ports: | ||
| - "2000:2000" | ||
| - "6001:6001" | ||
| - "7001:7001" | ||
| - "7002:7002" | ||
| - "80:80" | ||
| restart: ${SERVER_RESTART} | ||
| env_file: | ||
| - ./.env | ||
| phpmyadmin: | ||
| container_name: melia-dbadmin | ||
| networks: | ||
| - melia-network | ||
| image: phpmyadmin | ||
| ports: | ||
| - 8080:80 | ||
| restart: ${SERVER_RESTART} | ||
| environment: | ||
| - PMA_HOST=melia-database | ||
| - PMA_USER=root | ||
| - PMA_PASSWORD=${MYSQL_ROOT_PASSWORD} | ||
| - UPLOAD_LIMIT=300M | ||
| profiles: [] | ||
| env_file: | ||
| - ./.env | ||
| depends_on: | ||
| melia-database: | ||
| condition: service_healthy | ||
| networks: | ||
| melia-network: |
This file contains hidden or 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,18 +1,17 @@ | ||
| CREATE TABLE `character_etc_properties` ( | ||
| `propertyId` bigint(20) NOT NULL, | ||
| CREATE TABLE IF NOT EXISTS `character_etc_properties` ( | ||
| `propertyId` bigint(20) NOT NULL AUTO_INCREMENT, | ||
| `characterId` bigint(20) NOT NULL, | ||
| `name` varchar(64) NOT NULL, | ||
| `type` varchar(1) NOT NULL, | ||
| `value` varchar(255) NOT NULL | ||
| `value` varchar(255) NOT NULL, | ||
| PRIMARY KEY (`propertyId`), | ||
| KEY `characterId` (`characterId`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; | ||
|
|
||
| ALTER TABLE `character_etc_properties` | ||
| ADD PRIMARY KEY (`propertyId`), | ||
| ADD KEY `characterId` (`characterId`); | ||
|
|
||
| ALTER TABLE `character_etc_properties` | ||
| MODIFY `propertyId` bigint(20) NOT NULL AUTO_INCREMENT; | ||
| -- Drop the foreign key if it exists | ||
| -- ALTER TABLE `character_etc_properties` | ||
| -- DROP FOREIGN KEY `character_etc_properties_ibfk_1`; | ||
|
|
||
| -- Add the foreign key constraint again | ||
| ALTER TABLE `character_etc_properties` | ||
| ADD CONSTRAINT `character_etc_properties_ibfk_1` FOREIGN KEY (`characterId`) REFERENCES `characters` (`characterId`) ON DELETE CASCADE ON UPDATE CASCADE, | ||
| ADD CONSTRAINT `character_etc_properties_ibfk_2` FOREIGN KEY (`characterId`) REFERENCES `characters` (`characterId`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
| ADD CONSTRAINT `character_etc_properties_ibfk_1` FOREIGN KEY (`characterId`) REFERENCES `characters` (`characterId`) ON DELETE CASCADE ON UPDATE CASCADE; |
This file contains hidden or 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,13 +1,23 @@ | ||
| CREATE TABLE `storage_team` ( | ||
| CREATE TABLE IF NOT EXISTS `storage_team` ( | ||
| `accountId` bigint(20) NOT NULL, | ||
| `itemId` bigint(20) NOT NULL, | ||
| `position` int(11) NOT NULL | ||
| `position` int(11) NOT NULL, | ||
| PRIMARY KEY (`accountId`, `itemId`), | ||
| KEY `itemId` (`itemId`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; | ||
|
|
||
| -- Drop the first foreign key if it exists | ||
| -- ALTER TABLE `storage_team` | ||
| -- DROP FOREIGN KEY `storage_team_ibfk_1`; | ||
|
|
||
| -- Drop the second foreign key if it exists | ||
| -- ALTER TABLE `storage_team` | ||
| -- DROP FOREIGN KEY `storage_team_ibfk_2`; | ||
|
|
||
| -- Add the first foreign key constraint | ||
| ALTER TABLE `storage_team` | ||
| ADD PRIMARY KEY (`accountId`,`itemId`), | ||
| ADD KEY `itemId` (`itemId`); | ||
| ADD CONSTRAINT `storage_team_ibfk_1` FOREIGN KEY (`accountId`) REFERENCES `accounts` (`accountId`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- Add the second foreign key constraint | ||
| ALTER TABLE `storage_team` | ||
| ADD CONSTRAINT `storage_team_ibfk_1` FOREIGN KEY (`accountId`) REFERENCES `accounts` (`accountId`) ON DELETE CASCADE ON UPDATE CASCADE, | ||
| ADD CONSTRAINT `storage_team_ibfk_2` FOREIGN KEY (`itemId`) REFERENCES `items` (`itemUniqueId`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
| ADD CONSTRAINT `storage_team_ibfk_2` FOREIGN KEY (`itemId`) REFERENCES `items` (`itemUniqueId`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ive modified these two SQL because i was getting errors about it having two primary keys btw