_LazyDemon
_LazyDemon
RRailway
Created by Saicon Developer on 9/22/2023 in #✋|help
I have a flutter web app and I need to deploy but I can't build
# Environemnt to install flutter and build web
FROM debian:latest AS build-env

# install all needed stuff
RUN apt-get update
RUN apt-get install -y curl git unzip

# define variables
ARG FLUTTER_SDK=/usr/local/flutter
ARG APP=/app

#clone flutter
RUN git clone https://github.com/flutter/flutter.git $FLUTTER_SDK
# change dir to current flutter folder and make a checkout to the specific version
RUN cd $FLUTTER_SDK && git checkout efbf63d9c66b9f6ec30e9ad4611189aa80003d31

# setup the flutter path as an enviromental variable
ENV PATH="$FLUTTER_SDK/bin:$FLUTTER_SDK/bin/cache/dart-sdk/bin:${PATH}"

# Start to run Flutter commands
# doctor to see if all was installes ok
RUN flutter doctor -v

# create folder to copy source code
RUN mkdir $APP
# copy source code to folder
COPY . $APP
# stup new folder as the working directory
WORKDIR $APP

# Run build: 1 - clean, 2 - pub get, 3 - build web
RUN flutter clean
RUN flutter pub get
RUN flutter build web
# Environemnt to install flutter and build web
FROM debian:latest AS build-env

# install all needed stuff
RUN apt-get update
RUN apt-get install -y curl git unzip

# define variables
ARG FLUTTER_SDK=/usr/local/flutter
ARG APP=/app

#clone flutter
RUN git clone https://github.com/flutter/flutter.git $FLUTTER_SDK
# change dir to current flutter folder and make a checkout to the specific version
RUN cd $FLUTTER_SDK && git checkout efbf63d9c66b9f6ec30e9ad4611189aa80003d31

# setup the flutter path as an enviromental variable
ENV PATH="$FLUTTER_SDK/bin:$FLUTTER_SDK/bin/cache/dart-sdk/bin:${PATH}"

# Start to run Flutter commands
# doctor to see if all was installes ok
RUN flutter doctor -v

# create folder to copy source code
RUN mkdir $APP
# copy source code to folder
COPY . $APP
# stup new folder as the working directory
WORKDIR $APP

# Run build: 1 - clean, 2 - pub get, 3 - build web
RUN flutter clean
RUN flutter pub get
RUN flutter build web
9 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
yes! topdomain and all different types of subdomains(api, webserver) all work now 😄
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
omgggg i fixed it! i made your change but that didnt work, then i changed some values in my config now its working
apiServer:
port: 8000
publicHost: 0.0.0.0
publicPort: 8000
publicScheme: http

# Configuration for the Insights server.
insightsServer:
port: 8001
publicHost: 0.0.0.0
publicPort: 8001
publicScheme: http

# Configuration for the web server.
webServer:
port: 8080
publicHost: web.slashdesign.nl
publicPort: 8080
publicScheme: http
apiServer:
port: 8000
publicHost: 0.0.0.0
publicPort: 8000
publicScheme: http

# Configuration for the Insights server.
insightsServer:
port: 8001
publicHost: 0.0.0.0
publicPort: 8001
publicScheme: http

# Configuration for the web server.
webServer:
port: 8080
publicHost: web.slashdesign.nl
publicPort: 8080
publicScheme: http
in my yaml config file, the api and insights worked when i set to 0.0.0.0 but for the webserver to work a had to put in web.slashdesign.nl that fixed it
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
Yeah that was what I was working on for my client(that will later go too topdomain), it's not working rn but it shouldnt effect the code above for the server
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
i will leave it for now soo you can look, check you have latest pull
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
everything should be good now except web.slashdesign.nl, if you can see my project you should see all is green now and slash-design logs say all are listening
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
i was testing some things maybe that was what you saw or idk bad timing lol
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
where? your part should have the matchers?
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
my railway project should also be public, i work on production branch not staging in railway!
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
Ohw sorry
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
@brody192
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
api.slashdesign.nl web.slashdesign.nl insights.slashdesign.nl
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
No description
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
didnt even know you could do that lol
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
{
admin off
persist_config off
auto_https off
log {
format console
}
servers {
trusted_proxies static private_ranges
}
}

:{$PORT} {
log {
format console
}

respond /health 200
root * dist
encode gzip
file_server
try_files {path} /index.html
}

api.slashdesign.nl {
reverse_proxy slash-design.railway.internal:8080
}

web.slashdesign.nl {
reverse_proxy slash-design.railway.internal:8082
}
{
admin off
persist_config off
auto_https off
log {
format console
}
servers {
trusted_proxies static private_ranges
}
}

:{$PORT} {
log {
format console
}

respond /health 200
root * dist
encode gzip
file_server
try_files {path} /index.html
}

api.slashdesign.nl {
reverse_proxy slash-design.railway.internal:8080
}

web.slashdesign.nl {
reverse_proxy slash-design.railway.internal:8082
}
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
i updated above
54 replies
RRailway
Created by vidanova on 9/20/2023 in #✋|help
Bill
No description
153 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
No description
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
No description
54 replies
RRailway
Created by _LazyDemon on 9/20/2023 in #✋|help
serverpod
kk
54 replies