turingwars / turingwars

Write programs that fight for survival in a reboot of the classic Core War game!
https://turingwars.hmil.fr
5 stars 1 forks source link

Create docker infra #38

Closed hmil closed 6 years ago

hmil commented 6 years ago

Presumably a docker-compose with one Node.js container, and one mysql container. This could be in a separate repo.

lbarman commented 6 years ago

I have been trying to do so before your rewrite, and there was a bug with Debian/Docker/Sqlite that never got fixed.

I tried again (simply with docker-compose up) and it seems to be gone. However, the server is not listening. Will work on that.


In the docker

turingwars-server_1  | initializing front-end build pipeline...
turingwars-server_1  | Starting type checking service...
turingwars-server_1  | Using 1 worker with 2048MB memory limit
turingwars-server_1  | initializing DB...
turingwars-server_1  | No type errors found
turingwars-server_1  | Version: typescript 3.0.1
turingwars-server_1  | Time: 19512ms
turingwars-server_1  | Type checking in progress...
turingwars-server_1  | ℹ 「wdm」: Hash: e8ae9522bbac36c800bb
turingwars-server_1  | Version: webpack 4.16.5
turingwars-server_1  | Time: 14678ms
turingwars-server_1  | Built at: 2018-08-24 12:30:00
turingwars-server_1  |      Asset      Size  Chunks             Chunk Names
turingwars-server_1  |     app.js  1.37 MiB     app  [emitted]  app
turingwars-server_1  | app.js.map  1.51 MiB     app  [emitted]  app
turingwars-server_1  | Entrypoint app = app.js app.js.map
turingwars-server_1  | [./node_modules/react-router-dom/es/index.js] 1010 bytes {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/EditMenuScreen.tsx] 2.12 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/EditorScreen.tsx] 3.88 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/HomeScreen.tsx] 1 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/LoadHeroScreen.tsx] 2.87 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/PlaytestOponentPickerScreen.tsx] 3.25 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/PublishHeroScreen.tsx] 4.77 KiB {app} [built]
turingwars-server_1  | [./src/frontend/components/screens/ReplayScreen.tsx] 5.86 KiB {app} [built]
turingwars-server_1  | [./src/frontend/main.tsx] 2.66 KiB {app} [built]
turingwars-server_1  | [./src/frontend/services/player.ts] 3.31 KiB {app} [built]
turingwars-server_1  | [0] multi ./src/frontend/main.tsx 28 bytes {app} [built]
turingwars-server_1  | [react] external "React" 42 bytes {app} [built]
turingwars-server_1  | [react-dom] external "ReactDOM" 42 bytes {app} [built]
turingwars-server_1  | [react-redux] external "ReactRedux" 42 bytes {app} [built]
turingwars-server_1  | [redux] external "Redux" 42 bytes {app} [built]
turingwars-server_1  |     + 210 hidden modules
turingwars-server_1  | ℹ 「wdm」: Compiled successfully.
turingwars-server_1  | No type errors found
turingwars-server_1  | Version: typescript 3.0.1
turingwars-server_1  | Time: 17913ms

On my machine:

initializing front-end build pipeline...
Starting type checking service...
Using 1 worker with 2048MB memory limit
initializing DB...
Initializing server...
Server is listening on port 3000
No type errors found
Version: typescript 3.0.1
Time: 17104ms
Type checking in progress...
ℹ 「wdm」: Hash: e8ae9522bbac36c800bb
Version: webpack 4.16.5
Time: 14512ms
Built at: 2018-08-24 14:30:40
     Asset      Size  Chunks             Chunk Names
    app.js  1.37 MiB     app  [emitted]  app
app.js.map  1.51 MiB     app  [emitted]  app
Entrypoint app = app.js app.js.map
[./node_modules/react-router-dom/es/index.js] 1010 bytes {app} [built]
[./src/frontend/components/screens/EditMenuScreen.tsx] 2.12 KiB {app} [built]
[./src/frontend/components/screens/EditorScreen.tsx] 3.88 KiB {app} [built]
[./src/frontend/components/screens/HomeScreen.tsx] 1 KiB {app} [built]
[./src/frontend/components/screens/LoadHeroScreen.tsx] 2.87 KiB {app} [built]
[./src/frontend/components/screens/PlaytestOponentPickerScreen.tsx] 3.25 KiB {app} [built]
[./src/frontend/components/screens/PublishHeroScreen.tsx] 4.77 KiB {app} [built]
[./src/frontend/components/screens/ReplayScreen.tsx] 5.86 KiB {app} [built]
[./src/frontend/main.tsx] 2.66 KiB {app} [built]
[./src/frontend/services/player.ts] 3.31 KiB {app} [built]
[0] multi ./src/frontend/main.tsx 28 bytes {app} [built]
[react] external "React" 42 bytes {app} [built]
[react-dom] external "ReactDOM" 42 bytes {app} [built]
[react-redux] external "ReactRedux" 42 bytes {app} [built]
[redux] external "Redux" 42 bytes {app} [built]
    + 210 hidden modules
ℹ 「wdm」: Compiled successfully.
No type errors found
Version: typescript 3.0.1
Time: 17013ms

Notice the absence of the lines Initializing server... Server is listening on port 3000 in the docker run