Skip to content

Commit

Permalink
fix: devserver properly configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Nov 4, 2022
1 parent 8341fd1 commit fb74524
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// "forwardPorts": [],

// Uncomment the next line if you want start specific services in your Docker Compose config.
"runServices": ["ac-dev-server", "ac-database"],
"runServices": ["ac-dev-server", "ac-dev-database"],

// Uncomment the next line if you want to keep your containers running after VS Code shuts down.
// "shutdownAction": "none",
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,17 @@ The quickest way to access and work with the ac-dev-server is the following:

IMPORTANT:

* This container uses the same mysql instance of the ac-authserver/worldserver. Do not run the authserver and worldserver together with the dev-server to avoid
issues with the database consistency. If you want to setup a separate database for the dev server you can always extends the docker compose to add a second database instance (read the paragraph below)
* This container uses a different instance of the mysql database. It means that you won't have, by default, the same data available on the `ac-authserver` and `ac-worldserver` services

* The dev-server docker compose exposes the following ports: 3724 (authserver), 8085 (worldserver), 7878 (soap service)

* To share files between your host and the dev-server you can use the `var/shared` folder

* This dev-container includes all the tools needed to build the AC without configure anything. Look around and play with the vscode workspace to discover all the features available.

* if you have any file permission issues once inside the container, please run this command:
`sudo chown acore:acore -R .`


## Customize your server

Expand Down
49 changes: 43 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,58 @@ services:
AC_DISABLE_INTERACTIVE: "1"
#profiles: [db-import]

ac-dev-server:
<<: *ac-shared-conf
tty: true
privileged: true
image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master}
ac-dev-database:
image: mysql:8.0
restart: unless-stopped
cap_add:
- SYS_NICE # CAP_SYS_NICE
ports:
- ${DOCKER_DB_EXTERNAL_PORT:-63306}:3306
- ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085
- ${DOCKER_SOAP_EXTERNAL_PORT:-7878}:7878
- ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=${DOCKER_DB_ROOT_PASSWORD:-password}
volumes:
- type: volume
source: ac-dev-database
target: /var/lib/mysql
healthcheck:
test: "/usr/bin/mysql --user=root --password=$$MYSQL_ROOT_PASSWORD --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 40s
retries: 20
networks:
ac-dev-network:
aliases:
- ac-database # needed by the server *.conf file

ac-dev-server:
<<: *networks
tty: true
privileged: true
user: root
image: acore/ac-wotlk-dev-server:${DOCKER_IMAGE_TAG:-master}
environment:
DATAPATH: "/azerothcore/env/dist/data"
DOCKER_ETC_FOLDER: "env/docker/etc"
profiles: [dev]
volumes:
- ac-dev-server:/azerothcore
- ./var/shared:/azerothcore/var/shared
network_mode: service:ac-dev-database
working_dir: /azerothcore
depends_on:
ac-dev-database:
condition: service_healthy
networks:
- ac-dev-network

ac-dev-tools:
<<: *ac-shared-conf
image: acore/ac-wotlk-tools:${DOCKER_IMAGE_TAG:-master}
user: root
working_dir: /azerothcore/env/client/
volumes:
- ${DOCKER_CLIENT_DATA_FOLDER:-./var/client}:/azerothcore/env/client/Data
Expand All @@ -153,10 +188,12 @@ services:
volumes:
ac-database:
ac-dev-server:
ac-dev-database:
ac-client-data-dbc:
ac-client-data-maps:
ac-client-data-vmaps:
ac-client-data-mmaps:

networks:
ac-network:
ac-dev-network:

0 comments on commit fb74524

Please sign in to comment.